the dreaded offside rule
Malcolm Wallace
Malcolm.Wallace at cs.york.ac.uk
Fri Mar 10 06:01:56 EST 2006
"Simon Marlow" <simonmar at microsoft.com> 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, ... ]
Regards,
Malcolm
More information about the Haskell-prime
mailing list