Ticket #4359 (closed feature request: fixed)
Implement lambda-case/lambda-if
| Reported by: | batterseapower | Owned by: | simonmar |
|---|---|---|---|
| Priority: | high | Milestone: | 7.6.1 |
| Component: | Compiler | Version: | 7.1 |
| Keywords: | Cc: | hydo@…, cmoore@…, hackage.haskell.org@…, uzytkownik2@…, leather@…, illissius@…, mikhail.vorozhtsov@…, anton.nik@…, dterei, g9ks157k@… | |
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | None/Unknown | Difficulty: | Unknown |
| Test Case: | Blocked By: | ||
| Blocking: | Related Tickets: |
Description (last modified by simonpj) (diff)
I put together a patch for this Haskell' proposal ( http://hackage.haskell.org/trac/haskell-prime/ticket/41)
Prelude> (if then "Haskell" else "Cafe") False
"Cafe"
Prelude> (case of 1 -> "One"; _ -> "Not-one") 1
"One"
There seems to be some support for integrating this proposal into GHC (see http://permalink.gmane.org/gmane.comp.lang.haskell.cafe/81366)
The attached patches implement the feature, test it and document it.
See also the wiki page LambdasVsPatternMatching.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

