simonpj 2005/03/09 06:27:10 PST
Modified files:
ghc/compiler/typecheck Inst.lhs TcInstDcls.lhs TcSimplify.lhs
Log:
Fix the superclass translation for instance decls
Merge to STABLE
There is a long-standing difficulty whereby it's surprisingly easy
to accidentally generate an entirely-bogus recursive dictionary when
generating the definitions for the superclasses of an instance decl.
The problem arises because the default story is that whenever we
add a constraint to our pile of solved constraints, we automatically
add all its superclasses. But that is simply wrong when we are trying
to generate superclasses.
Solution: do no auto-superclass addition when solving the superclass
constraints of an instance declaration. I think should fix it once and
for all.
tcrun021, tcrun033 are test cases
tcrun033 showed up the bug; thanks to Simon Foster and Ralf Laemmel.
Revision Changes Path
1.148 +74 -68 fptools/ghc/compiler/typecheck/Inst.lhs
1.174 +11 -67 fptools/ghc/compiler/typecheck/TcInstDcls.lhs
1.152 +177 -111 fptools/ghc/compiler/typecheck/TcSimplify.lhs
_______________________________________________
Cvs-ghc mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/cvs-ghc