Skip to content
Snippets Groups Projects
Commit b610eca3 authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

[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.
parent 45a3e562
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment