From: simonpj@microsoft.com Date: Thu, 12 Nov 2009 09:23:23 +0000 (+0000) Subject: Improve warning message X-Git-Tag: 2009-11-15~11 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=74bc2267c6e884a66cd3e03c218c849519b975f7;p=ghc-hetmet.git Improve warning message --- diff --git a/compiler/coreSyn/CoreUtils.lhs b/compiler/coreSyn/CoreUtils.lhs index 23eec49..58beaf0 100644 --- a/compiler/coreSyn/CoreUtils.lhs +++ b/compiler/coreSyn/CoreUtils.lhs @@ -210,7 +210,7 @@ mkCoerce co expr -- if to_ty `coreEqType` from_ty -- then expr -- else - ASSERT2(from_ty `coreEqType` (exprType expr), text "Trying to coerce" <+> text "(" <> ppr expr $$ text "::" <+> ppr (exprType expr) <> text ")" $$ ppr co $$ pprEqPred (coercionKind co)) + WARN(not (from_ty `coreEqType` exprType expr), text "Trying to coerce" <+> text "(" <> ppr expr $$ text "::" <+> ppr (exprType expr) <> text ")" $$ ppr co $$ pprEqPred (coercionKind co)) (Cast expr co) \end{code}