From f4af918f1c71daebd6a3a9b2f26fd80326400dab Mon Sep 17 00:00:00 2001 From: "simonpj@microsoft.com" Date: Wed, 11 Feb 2009 09:40:28 +0000 Subject: [PATCH] Turn another ASSERT into a WARN (temproraily) Fix Trac #3011 by temporarily making it only a WARN if we assign twice to the same unification variable. --- compiler/typecheck/TcMType.lhs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/compiler/typecheck/TcMType.lhs b/compiler/typecheck/TcMType.lhs index 75ce6c9..47592f5 100644 --- a/compiler/typecheck/TcMType.lhs +++ b/compiler/typecheck/TcMType.lhs @@ -523,7 +523,12 @@ writeMetaTyVar tyvar ty = ASSERT( isMetaTyVar tyvar ) -- TOM: It should also work for coercions -- ASSERT2( k2 `isSubKind` k1, (ppr tyvar <+> ppr k1) $$ (ppr ty <+> ppr k2) ) - do { ASSERTM2( do { details <- readMetaTyVar tyvar; return (isFlexi details) }, ppr tyvar ) + do { if debugIsOn then do { details <- readMetaTyVar tyvar; + ; WARN( not (isFlexi details), ppr tyvar ) + return () } + else return () + -- Temporarily make this a warning, until we fix Trac #2999 + ; traceTc (text "writeMetaTyVar" <+> ppr tyvar <+> text ":=" <+> ppr ty) ; writeMutVar (metaTvRef tyvar) (Indirect ty) } where -- 1.7.10.4