#4359: Implement lambda-case/lambda-if
---------------------------------+------------------------------------------
    Reporter:  batterseapower    |        Owner:              
        Type:  feature request   |       Status:  new         
    Priority:  normal            |    Milestone:  7.4.1       
   Component:  Compiler          |      Version:  7.1         
    Keywords:                    |     Testcase:              
   Blockedby:                    |   Difficulty:              
          Os:  Unknown/Multiple  |     Blocking:              
Architecture:  Unknown/Multiple  |      Failure:  None/Unknown
---------------------------------+------------------------------------------

Comment(by claus):

 Some of the syntax suggestions here scare me. But even if an unproblematic
 syntax could be found, do you really want to add a complex language
 construct with limited usage pattern? One nice thing about Haskell is that
 it tries to keep code programmable/library-based, with only minimal
 support through syntax built-ins.

 I would like a 'case'-as-a-function variant, especially if it is more
 basic than the current 'case-of' (ie, the 'case-of' can be defined in
 terms of 'case', so the language does not get any bigger, just more
 flexible).

 While I'm here: have you looked at [http://hackage.haskell.org/trac
 /haskell-prime/ticket/114 introduce lambda-match (explicit match failure
 and fall-through)], from around the same time as lambda-case? At the time,
 it was implemented as a small parser modification, with most of the
 functionality in a library (see [http://hackage.haskell.org/trac/haskell-
 prime/ticket/114#attachments ticket attachments] for patch, library, and
 some examples), and 'case'-as-a-function was easy to implement in terms of
 it. But it also supported other useful programming patterns.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4359#comment:31>
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

Reply via email to