bringing discussions to a close

Simon Peyton-Jones simonpj at
Wed Mar 29 02:34:54 EST 2006

| As mentioned in my email from Tuesday March 21 [1], I'd like to bring
| most threads to a close very soon, and to document your discussions on
| the wiki.  The only topics that should remain open are concurrency and

Just before we do I'd like to mention one point that John Hughes and I

	Proposal: make all pattern bindings completely monomorphic
		    (regardless of type signatures)

At the moment you can say
	let (f,g) = e in ...
and get *polymorphic* values f,g.  This causes a good deal of trouble in
the implementation (think of what the System F translation looks like),
and it's an odd thing to do.  Why odd?  Well here it's fine:
	data T = C (forall a. a->a)
	h x = let C f = e in ...
Constructor C has a polymorphic argument, so we can match e against (C
f) and get a polymorphic function.  But in the first example, (,) only
takes monomorphic arguments, so we have to generalise after selection.
To put it another way, even if the "..." is definitely strict in f, we
cannot transform to
	case e of (f,g) -> ...

I've been meaning to give GHC a flag to give it this behaviour, so that
I can see if any Haskell programs break.  My bet is that this is a
feature that is tricky to implement, but which is virtually never used.
Removing it would simplify the language.

I have made a ticket for this


More information about the Haskell-prime mailing list