Improve warning message
authorsimonpj@microsoft.com <unknown>
Thu, 12 Nov 2009 09:23:23 +0000 (09:23 +0000)
committersimonpj@microsoft.com <unknown>
Thu, 12 Nov 2009 09:23:23 +0000 (09:23 +0000)
compiler/coreSyn/CoreUtils.lhs

index 23eec49..58beaf0 100644 (file)
@@ -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}