Skip to content
  • Simon Peyton Jones's avatar
    [project @ 2004-12-06 10:51:36 by simonpj] · f6f3819f
    Simon Peyton Jones authored
    ------------------------------------
    	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).
    f6f3819f