summaryrefslogtreecommitdiff
path: root/compiler/GHC/Core/Opt/SpecConstr.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Core/Opt/SpecConstr.hs')
-rw-r--r--compiler/GHC/Core/Opt/SpecConstr.hs10
1 files changed, 4 insertions, 6 deletions
diff --git a/compiler/GHC/Core/Opt/SpecConstr.hs b/compiler/GHC/Core/Opt/SpecConstr.hs
index c5745f8b2f..58e77d76eb 100644
--- a/compiler/GHC/Core/Opt/SpecConstr.hs
+++ b/compiler/GHC/Core/Opt/SpecConstr.hs
@@ -19,8 +19,6 @@ module GHC.Core.Opt.SpecConstr(
SpecConstrAnnotation(..)
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Core
@@ -2178,9 +2176,9 @@ callToPats env bndr_occs call@(Call fn args con_env)
bad_covar v = isId v && not (is_in_scope v)
; -- pprTrace "callToPats" (ppr args $$ ppr bndr_occs) $
- WARN( not (isEmptyVarSet bad_covars)
- , text "SpecConstr: bad covars:" <+> ppr bad_covars
- $$ ppr call )
+ warnPprTrace (not (isEmptyVarSet bad_covars))
+ ( text "SpecConstr: bad covars:" <+> ppr bad_covars
+ $$ ppr call) $
if interesting && isEmptyVarSet bad_covars
then return (Just (CP { cp_qvars = qvars', cp_args = pats }))
else return Nothing }
@@ -2404,7 +2402,7 @@ samePat (CP { cp_qvars = vs1, cp_args = as1 })
same e1 (Tick _ e2) = same e1 e2
same e1 (Cast e2 _) = same e1 e2
- same e1 e2 = WARN( bad e1 || bad e2, ppr e1 $$ ppr e2)
+ same e1 e2 = warnPprTrace (bad e1 || bad e2) (ppr e1 $$ ppr e2) $
False -- Let, lambda, case should not occur
bad (Case {}) = True
bad (Let {}) = True