simonpj 2004/12/06 02:51:41 PST
Modified files:
ghc/compiler/typecheck TcSimplify.lhs
Log:
------------------------------------
Bug in loop detection in TcSimplify
------------------------------------
The type-class context simplifier has been able to
build recursive dictionaries for some time: co-induction.
That is, you can build a proof for constraint C by assuming
that C holds when proving the preconditions of C.
You need to be in -fallow-undecidable-instances land to
make use of this: see comments with [RECURSIVE DICTIONARIES]
in TcSimplify.lhs.
Anyway, this is all fine, but I'd implemented it wrong! You need
to be very careful with superclasses, or you can make a bogus
loop by mistake. This commit fixes it; tests LoopOfTheDay{1,2,3}
will test it (thanks Ralf Laemmel).
Revision Changes Path
1.140 +11 -6 fptools/ghc/compiler/typecheck/TcSimplify.lhs
_______________________________________________
Cvs-ghc mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/cvs-ghc