Do not allow Typeable on constraints (Trac #9858)
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.
Showing with 107 additions and 4 deletions