Add -XImpredicativeTypes, and tighten up type-validity checking (cf Trac 2019)
authorsimonpj@microsoft.com <unknown>
Mon, 7 Jan 2008 11:54:51 +0000 (11:54 +0000)
committersimonpj@microsoft.com <unknown>
Mon, 7 Jan 2008 11:54:51 +0000 (11:54 +0000)
commit5e04ae341a945ef430e9d941b34722b8de1f6aae
tree0459a25d89fadb3f427e3d1220222b57bffff63f
parentd70b588ca35138bcfa21f30eb27b2015cb954ed0
Add -XImpredicativeTypes, and tighten up type-validity checking (cf Trac 2019)

Somehow we didn't have a separate flag for impredicativity; now we do.

Furthermore, Trac #2019 showed up a missing test for monotypes in data
constructor return types.  And I realised that we were even allowing
things like
Num (forall a. a) => ...
which we definitely should not.

This patch insists on monotypes in several places where we were (wrongly)
too liberal before.

Could be merged to 6.8 but no big deal.
compiler/main/DynFlags.hs
compiler/typecheck/TcMType.lhs
compiler/typecheck/TcTyClsDecls.lhs
docs/users_guide/flags.xml
docs/users_guide/glasgow_exts.xml