Ticket #145 (new enhancement)

Opened 5 years ago

Last modified 5 years ago

Add a point free case expression

Reported by: erikd Owned by:
Priority: minor Milestone:
Component: Source Parser Version:
Keywords: Cc:

Description

Straight from the haskell cafe mailing list:

http://www.haskell.org/pipermail/haskell-cafe/2009-November/068673.html

Instead of this:

myFunc = anotherFunc $ \x -> case x of
                               Left err -> print err
                               Right msg -> putStrLn msg

allow this:

myFunc = anotherFunc $ case of
                         Left err -> print err
                         Right msg -> putStrLn msg

Change History

Changed 5 years ago by benl

  • component changed from Source Semantics to Source Parser

At one stage we had something like

\case

Left err -> print err Right msg -> putStrLn msg

though i took it out when I moved the parser to parsec.

Changed 5 years ago by benl

\case 
   Left err -> print err
   Right msg -> putStrLn msg

Changed 5 years ago by benl

Note: See TracTickets for help on using tickets.