• Simon Peyton Jones's avatar
    Do not allow Typeable on constraints (Trac #9858) · 7b042d5a
    Simon Peyton Jones authored
    The astonishingly-ingenious trio of
    Shachaf Ben-Kiki, Ørjan Johansen and Nathan van Doorn
    managed to persuade GHC 7.10.1 to cough up unsafeCoerce.
    That is very bad. This patch fixes it by no allowing Typable
    on Constraint-kinded things.  And that seems right, since
    it is, in effect, a form of impredicative polymorphism,
    which Typeable definitely doesn't support.
    We may want to creep back in the direction of allowing
    Typeable on constraints one day, but this is a good
    fix for now, and closes a terrible hole.
TcInteract.hs 78.4 KB