diff options
author | Ian Lynagh <igloo@earth.li> | 2011-05-25 19:07:51 +0100 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2011-05-25 20:47:26 +0100 |
commit | a5f5a70c41b4bce2715bf5d478171fbaf060cddf (patch) | |
tree | e9be157af01bcb2c9a4ac51e01d3b9c71c0d4307 /compiler/coreSyn/CoreUtils.lhs | |
parent | ea3a9edda14f952042fa262abd37cc4fa0c1dd6d (diff) | |
download | haskell-sdoc.tar.gz |
More DynFlags + SDocsdoc
Diffstat (limited to 'compiler/coreSyn/CoreUtils.lhs')
-rw-r--r-- | compiler/coreSyn/CoreUtils.lhs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/coreSyn/CoreUtils.lhs b/compiler/coreSyn/CoreUtils.lhs index 4146b621e1..580f467891 100644 --- a/compiler/coreSyn/CoreUtils.lhs +++ b/compiler/coreSyn/CoreUtils.lhs @@ -210,7 +210,7 @@ mkCoerce co expr -- if to_ty `eqType` from_ty -- then expr -- else - WARN(not (from_ty `eqType` exprType expr), text "Trying to coerce" <+> text "(" <> ppr expr $$ text "::" <+> ppr (exprType expr) <> text ")" $$ ppr co $$ pprEqPred (coercionKind co)) + WARN(dflags, not (from_ty `eqType` exprType expr), text "Trying to coerce" <+> text "(" <> ppr expr $$ text "::" <+> ppr (exprType expr) <> text ")" $$ ppr co $$ pprEqPred (coercionKind co)) (Cast expr co) \end{code} @@ -1223,10 +1223,10 @@ hash_expr env (Let (NonRec b r) e) = hash_expr (extend_env env b) e * fast_ha hash_expr env (Let (Rec ((b,_):_)) e) = hash_expr (extend_env env b) e hash_expr env (Case e _ _ _) = hash_expr env e hash_expr env (Lam b e) = hash_expr (extend_env env b) e -hash_expr _ (Type _) = WARN(True, text "hash_expr: type") 1 +hash_expr _ (Type _) = WARN(dflags, True, text "hash_expr: type") 1 -- Shouldn't happen. Better to use WARN than trace, because trace -- prevents the CPR optimisation kicking in for hash_expr. -hash_expr _ (Coercion _) = WARN(True, text "hash_expr: coercion") 1 +hash_expr _ (Coercion _) = WARN(dflags, True, text "hash_expr: coercion") 1 fast_hash_expr :: HashEnv -> CoreExpr -> Word32 fast_hash_expr env (Var v) = hashVar env v |