Opened 5 years ago

Last modified 3 years ago

#4359 closed feature request

Implement lambda-case/lambda-if — at Initial Version

Reported by: batterseapower Owned by:
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 Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

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.

Change History (2)

Changed 5 years ago by batterseapower

Changed 5 years ago by batterseapower

Note: See TracTickets for help on using tickets.