[GHC] #7081: add arrow analogs of lambda case and multi-way if
GHC
cvs-ghc at haskell.org
Mon Jul 16 21:01:46 CEST 2012
#7081: add arrow analogs of lambda case and multi-way if
------------------------------+---------------------------------------------
Reporter: jeltsch | Owner:
Type: feature request | Status: new
Priority: normal | Component: Compiler
Version: 7.5 | Keywords:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
Failure: None/Unknown | Testcase:
Blockedby: | Blocking:
Related: |
------------------------------+---------------------------------------------
GHC has now support for lambda case and multi-way if (see ticket #4359).
It would be good if arrow variants of these features would be implemented.
There are three things that should be considered:
Lambda case expressions should have analog {{{proc}}} expressions where
{{{
proc case pat_1 -> cmd_1
...
pat_n -> cmd_n
}}}
desugars to
{{{
proc fresh -> case fresh of
pat_1 -> cmd_1
...
pat_n -> cmd_n
}}}
Lambda case expressions should also have analog arrow commands where
{{{
\ case pat_1 -> cmd_1
...
pat_n -> cmd_n
}}}
desugars to
{{{
\ fresh -> case fresh of
pat_1 -> cmd_1
...
pat_n -> cmd_n
}}}
Multi-way if expressions should have analog arrow commands where
{{{
if | cond_1 -> cmd_1
...
cond_n -> cmd_n
}}}
desugars to
{{{
case () of
_ | cond_1 -> cmd_1
...
| cond_n -> cmd_n
}}}
Identifiers {{{pat_i}}}, {{{cond_i}}}, and {{{cmd_i}}} denote patterns,
boolean expressions, and arrow commands, respectively.
Bug #7071 has to be fixed before starting with this ticket.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7081>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list