[GHC] #4359: Implement lambda-case/lambda-if
GHC
cvs-ghc at haskell.org
Sun Oct 3 08:55:11 EDT 2010
#4359: Implement lambda-case/lambda-if
---------------------------------+------------------------------------------
Reporter: batterseapower | Owner:
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.1
Keywords: | Testcase:
Blockedby: | Difficulty:
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
Comment(by malcolm.wallace@…):
I would disagree that monadic bindings are the only (or even a major) use
case.
Personally, I would often like the ability to have a standard lambda that
can discriminate patterns on the value being bound.
{{{
foo = map (case of Alt1 a -> burble a
Alt2 | (x:xs) <- something -> something more
otherwise -> def)
}}}
Lambda-case is more general than mcase.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4359#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list