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. On Tue, Jul 10, 2012 at 8:55 AM, Chris Smith <[email protected]> wrote: > On Tue, Jul 10, 2012 at 5:53 AM, Wolfgang Jeltsch > <[email protected]> wrote: > > If we use \case for functions, we should use proc case for arrows; > > if we use \of for functions, we should use proc of for arrows. > > > > By the way, is proc a layout herald already? > > No, proc is not a layout herald. The normal pattern is to use a do in > the command part of the proc syntax, so it's do that introduces the > layout. So "proc of" would fit in cleanly as a way to do proc with > multiple patterns. Or "proc case", but again that's just a really > ugly language wart, IMO uglier than just writing out the longhand > version of "proc x -> case x of". > > -- > Chris Smith > > _______________________________________________ > Glasgow-haskell-users mailing list > [email protected] > http://www.haskell.org/mailman/listinfo/glasgow-haskell-users >
_______________________________________________ Glasgow-haskell-users mailing list [email protected] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
