On 07/12/2012 04:27 AM, Iavor Diatchki wrote:
Hello,
I am late to the discussion and this is not entirely on topic, for which
I apologize, but I like the multi-branch case syntax someone mentioned
earlier:
Writing:
> case
> | p1 -> e1
> | p2 -> e2
> | ...
desugars to:
> case () of
> _ | p1 -> e2
> | p2 -> e2
> | ...
-Iavor
PS: I think it also makes sense to use "if" instead of "case" for this.
Either way, I find myself writing these kind of cases quite often, so
having the sugar would be nice.
See [1]. I plan to implement it after lambda-case goes in.
[1] http://hackage.haskell.org/trac/haskell-prime/wiki/MultiWayIf
_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users