Move the constraint-kind validity check
authorSimon Peyton Jones <simonpj@microsoft.com>
Sat, 11 Jun 2016 22:56:42 +0000 (23:56 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Mon, 13 Jun 2016 09:57:16 +0000 (10:57 +0100)
commit35c9de7ca053eda472cb446c53bcd2007bfd8394
tree80d86b76d84662ebb810a28a57c544fb3ee043c5
parent7afb7adf45216701e4f645676ecc0668f64b424d
Move the constraint-kind validity check

For type synonyms, we need to check that if the RHS has
kind Constraint, then we have -XConstraintKinds.  For
some reason this was done in checkValidType, but it makes
more sense to do it in checkValidTyCon.

I can't remember quite why I made this change; maybe it fixes
a Trac ticket, but if so I forget which.  But it's a modest
improvement anyway.
compiler/typecheck/TcTyClsDecls.hs
compiler/typecheck/TcValidity.hs