In the original language design the Haskell committee considered
allowing multiple occurrences of the same variable in a pattern (with
the suggested equality tests), but it was rejected in favour of
simplicity.

  -- Lennart

On Fri, May 15, 2009 at 11:30 AM, Sittampalam, Ganesh
<ganesh.sittampa...@credit-suisse.com> wrote:
> Conor McBride wrote:
>> On 15 May 2009, at 09:11, Sittampalam, Ganesh wrote:
>>>
>>> but then pattern matching can introduce Eq constraints which some
>>> might see as a bit odd.
>>
>> Doesn't seem that odd to me. Plenty of other language features come
>> with constraints attached.
>
> It's the introduction of a constraint from tweaking a pattern that is
> odd, I think. By way of precedent H98 rejected this kind of idea in
> favour of putting 'fail' into Monad.
>
> Ganesh
>
> ===============================================================================
>  Please access the attached hyperlink for an important electronic 
> communications disclaimer:
>  http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
>  ===============================================================================
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to