#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 simonmar):
I think it would be disappointing if we couldn't do multi-argument
functions this way. I like Max's suggestion in comment:13:
{{{
\case { (Just x) (Just y) -> x + y; _ _ -> 1 } ==> \a b -> case (a, b) of
{ (Just x, Just y) -> x +y; (_, _) -> 1 }
}}}
Admittedly the syntax differs from a `case` expression, which could be
confusing. So perhaps it should be `\let` instead? Or maybe we should
just bite the bullet and pick a new keyword, e.g. `fun`?
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4359#comment:21>
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