Add -fmono-pat-binds, and make it the default
authorsimonpj@microsoft.com <unknown>
Sat, 22 Jul 2006 10:22:45 +0000 (10:22 +0000)
committersimonpj@microsoft.com <unknown>
Sat, 22 Jul 2006 10:22:45 +0000 (10:22 +0000)
In Haskell 98, pattern bindings are generalised.  Thus in
(f,g) = (\x->x, \y->y)
both f and g will get polymorphic types.  I have become convinced
that generalisation for pattern-bound variables is just a bridge
toof far. It is (I claim) almost never needed, and it adds significant
complication.  (All the more so if we add bang patterns.)

So the flag -fmono-pat-binds switches off generalisation for pattern
bindings.  (A single variable is treated as a degnerate funtction
binding.)

Furthremore, as an experiment, I'm making it the default.  I want
to see how many progarms fail with monomorphic pattern bindings.

You can recover the standard behaviour with -fno-mono-pa-binds.


No differences found