On 10 March 2006 11:02, Malcolm Wallace wrote:
> "Simon Marlow" <[EMAIL PROTECTED]> wrote:
>
>> Here's another couple that just occurred to me:
>>
>> f x | let y = x = y
>> f x = case x of _ | let y = x -> y
>>
>> granted these are unlikely to occur in practice.
>
> Are these Haskell'98? I'm afraid I don't understand how a let binding
> (without "in") can occur in a guard for a function decl or case
> branch. In Ben's examples, the vertical bar was not a guard, but the
> separator in a comprehension (although he omitted to show the
> surrounding brackets...)
>
> [ ... | let x, y :: T
> x = 3
> y = 4,
> ... ]
>
> [ ... | let x = 3, ... ]
Right, they're not Haskell 98, they all require pattern guards.
Cheers,
Simon
_______________________________________________
Haskell-prime mailing list
[email protected]
http://haskell.org/mailman/listinfo/haskell-prime