#4359: Implement lambda-case/lambda-if
-------------------------------+--------------------------------------------
Reporter: batterseapower | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: 7.6.1
Component: Compiler | Version: 7.1
Resolution: | Keywords:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
Failure: None/Unknown | Difficulty: Unknown
Testcase: | Blockedby:
Blocking: | Related:
-------------------------------+--------------------------------------------
Comment(by mikhail.vorozhtsov):
It would be reasonable to split multi-clase-lambdas into a separate
ticket, so that each feature can be discussed in a clearer context of pros
and cons (e.g. lambda-case does /not/ break any idioms). What do you
think?
I've been using lambda-case at work for a year and never looked back to
tmp1,tmp2,...[1] But patching GHC every time /is/ irksome. I even started
to think about replacing GHC lexer/parser with modular (combinators-based)
analogs, to allow compiler plugins to hook into parsing.
[1] I write a lot of code like this:
{{{
await (event1 .?. event2 ... eventN) >>= \case
(elem0 -> Just v) -> ...
(elem1 -> Just v) -> ...
...
}}}
If you do it without `\case`, temporary bindings can easily go into tmp10+
in a single function.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4359#comment:60>
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