The monomorphism restriction and monomorphic pattern bindings
Simon Marlow
marlowsd at gmail.com
Mon Apr 28 17:28:29 EDT 2008
Ian Lynagh wrote:
> On Mon, Apr 28, 2008 at 09:42:10AM -0700, Simon Marlow wrote:
>> Ok. So I counter-propose that we deal with pattern bindings like this:
>>
>> The static semantics of a pattern binding are given by the following
>> translation. A binding 'p = e' has the same meaning as the set of
>> bindings
>>
>> z = e
>> x1 = case z of { p -> x1 }
>> ...
>> xn = case z of { p -> xn }
>>
>> where z is fresh, and x1..xn are the variables of the pattern p.
>
> Just to check, this is saying "no change relative to Haskell 98"
> (although perhaps specifying it less ambiguously), right?
Right.
In the absence of the MR, we need a way to say precisely what
polymorphic overloaded pattern bindings mean, and the translation does
just that.
Cheers,
Simon
More information about the Haskell-prime
mailing list