Skip to content
  • Simon Peyton Jones's avatar
    Orient improvement constraints better · 12cfcbeb
    Simon Peyton Jones authored
    This patch fixes an infinite loop in the constraint solver,
    shown up by Trac #12522.
    
    The solution is /very/ simple: just reverse the orientation of the
    derived constraints arising from improvement using type-family
    injectivity.  I'm not very proud of the fix --- it seems fragile
    --- but it has the very great merit of simplicity, and it works
    fine.
    
    See Note [Improvement orientation] in TcInteract, and some
    discussion on the Trac ticket.
    
    (cherry picked from commit b255ae7b)
    12cfcbeb