Opened 7 years ago

Last modified 5 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@…,…, 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 Rev(s):
Wiki Page:


I put together a patch for this Haskell' proposal (

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

The attached patches implement the feature, test it and document it.

Change History (2)

Changed 7 years ago by batterseapower

Attachment: LambdaCase-Compiler.patch added

Changed 7 years ago by batterseapower

Attachment: LambdaCase-Testsuite.patch added
Note: See TracTickets for help on using tickets.