
12 Jul
2012
12 Jul
'12
5:25 a.m.
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