Ticket #7081 (new feature request)
arrow analogs of lambda case and multi-way if
| Reported by: | jeltsch | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 7.8.1 |
| Component: | Compiler | Version: | 7.5 |
| Keywords: | Cc: | ||
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | None/Unknown | Difficulty: | Unknown |
| Test Case: | Blocked By: | ||
| Blocking: | Related Tickets: |
Description
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.
Change History
Note: See
TracTickets for help on using
tickets.
