[project @ 2000-06-09 15:53:12 by simonpj]
GHC gets upset if you have types like
Eq a => a->a
where 'a' is *not* universally quantified.
By "upset" I mean that the typechecker generates
rather bogus code, that subsequently kills Lint.
Such types used to be rejected in the renamer,
but Jeff removed that in favour of an ambiguity
check in TcMonoType. I remember agreeing to move
the renamer check to the type checker, and Jeff did this,
but the check in TcMonoType was only checking for
*ambiguity*, which isn't quite the same.
I've restored the missing check and commented it
better in TcMonoType.
Jeff: if this isn't right for you, let's dicuss.
Incidentally, I also generalise the ambiguity check
to detect
forall a. ?x::a => Int
which is ambiguous.
I did a few formatting changes too.