On 10/2/10, Christopher Done <chrisd...@googlemail.com> wrote: > On 2 October 2010 20:23, Max Bolingbroke <batterseapo...@hotmail.com> wrote: >> Do you like this feature and think it would be worth incorporating >> this into GHC? Or is it too specialised to be of use? If there is >> enough support, I'll create a ticket and see what GHC HQ make of it. > > Nice work! I like it and have wanted it for a while, and I know many > in the #haskell IRC channel would like it. The case is especially > useful. Maybe the if is only useful sometimes. > +1 for `case of'... I have called for it on many an occasion in #haskell. Thanks for implementing it, Max!
I primarily see it as a way to remove a point from `\x -> case x of ...', not a way to augment lambdas with pattern matching, like in `\0 -> 1 \n k -> k-1'. I suppose both of them work with monadic casing, with the `m >>=' trick. `\case' or `\case of' would work okay as well, the former Simon suggested, but some keywords *somewhere* would be nice, to avoid a perl-like procession of punctuation. (But the code golfer in me says otherwise.) Matt _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe