#4359: Implement lambda-case/lambda-if
---------------------------------+------------------------------------------
Reporter: batterseapower | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: 7.4.1
Component: Compiler | Version: 7.1
Keywords: | Testcase:
Blockedby: | Difficulty:
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
Comment(by mikhail.vorozhtsov):
I ported Max's patch to (one-argument) {{{\case}}} syntax. I haven't
touched alternative layout rules as I'm not familiar with them. Please
review.
This syntax can be later extended to handle multiple arguments:
{{{
\case
Just x, Just y -> e1
Just x, _ -> e2
}}}
which would be translated to
{{{
\a b -> case (a, b) of
(Just x, Just y) -> e1
(Just x, _) -> e2
}}}
What do you think?
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4359#comment:19>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs