Turn another ASSERT into a WARN (temproraily)
authorsimonpj@microsoft.com <unknown>
Wed, 11 Feb 2009 09:40:28 +0000 (09:40 +0000)
committersimonpj@microsoft.com <unknown>
Wed, 11 Feb 2009 09:40:28 +0000 (09:40 +0000)
Fix Trac #3011 by temporarily making it only a WARN if we assign twice
to the same unification variable.

compiler/typecheck/TcMType.lhs

index 75ce6c9..47592f5 100644 (file)
@@ -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