• Simon Peyton Jones's avatar
    Fix and document cloneWC · 857ef25e
    Simon Peyton Jones authored
    The cloneWC, cloneWanted, cloneImplication family are used by
      * TcHoleErrors
      * TcRule
    to clone the /bindings/ in a constraint, so that solving the
    constraint will not add bindings to the program. The idea is only
    to affect unifications.
    
    But I had it wrong -- I failed to clone the EvBindsVar of an
    implication.  That gave an assert failure, I think, as well as
    useless dead code.
    
    The fix is easy.  I'm not adding a test case.
    
    In the type 'TcEvidence.EvBindsVar', I also renamed the
    'NoEvBindsVar' constructor to 'CoEvBindsVar'.  It's not that we
    have /no/ evidence bindings, just that we can only have coercion
    bindings, done via HoleDest.
    857ef25e
TcInteract.hs 101 KB