• simonpj's avatar
    [project @ 2005-03-09 14:26:56 by simonpj] · aca101dd
    simonpj authored
    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.
TcInstDcls.lhs 22 KB