A bug in the constraint simplifier means that an equality can be solved
twice. It's harmless, and will go away with the new constraint simplifier.
Hence warning, to avoid unnecessary outright failure on eg Trac #2999.
import Bag
import Outputable
import SrcLoc ( Located(..) )
import Bag
import Outputable
import SrcLoc ( Located(..) )
+import Util ( debugIsOn )
import Maybes
import FastString
import Maybes
import FastString
--
normaliseEqs :: [Inst] -> TcM EqConfig
normaliseEqs eqs
--
normaliseEqs :: [Inst] -> TcM EqConfig
normaliseEqs eqs
- = do { ASSERTM2( allM wantedEqInstIsUnsolved eqs, ppr eqs )
+ = do { if debugIsOn then do { all_unsolved <- allM wantedEqInstIsUnsolved eqs
+ ; let msg = ptext (sLit "(This warning is harmless; for Simon & Manuel)")
+ ; WARN( not all_unsolved, msg $$ ppr eqs ) return () }
+ else return ()
+ -- This is just a warning (not an error) because a current
+ -- harmless bug means that we sometimes solve the same
+ -- equality more than once It'll go away with the new
+ -- solver. See Trac #2999 for example
+
; traceTc $ ptext (sLit "Entering normaliseEqs")
; (eqss, skolemss) <- mapAndUnzipM normEqInst eqs
; traceTc $ ptext (sLit "Entering normaliseEqs")
; (eqss, skolemss) <- mapAndUnzipM normEqInst eqs