Taral wrote:
On 1/31/07, Conor McBride <[EMAIL PROTECTED]> wrote:
So, as far as Haskell' is concerned, I'd favour forbidding non-empty
cases, but only because I favour having some more explicit syntax for
empty cases, further down the line.
I see nothing wrong with "case x of {}", with required braces. The
layout rule never generates empty braces.
main = do
a <- do
b <- something
case b of
return a
Doesn't the layout rule convert the above to:
main = do { a <- do { b <- something; case b of {}}; return a}
^^
empty braces
In any case I thought the layout rule was supposed to be regarded as just a
convenience rather than making a distinction between explicit braces and
braces added by the rule?
Also, can anyone explain why empty case constructs are needed? Why not just
write undefined?
Brian.
--
http://www.metamilk.com
_______________________________________________
Haskell-prime mailing list
Haskell-prime@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-prime