#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 mikhail.vorozhtsov):

 Replying to [comment:22 simonpj]:
 {{{
 >    f x $ \y ->
 >    g y $ \z ->
 >    blah
 }}}
 Scary. It happens that I'm doing exactly that (replace {{{$}}} with
 {{{>>=ᵢ}}}).
 I also think that {{{\}}} is just too "small" of a token to start a new
 layout.
 I remember someone on the list suggesting the following syntax:
 {{{
 \ p1, p2 -> e1
 | p3, p4 -> e2
 }}}
 which I find more graphic.

 Why don't we just have both, as different extensions (MultiClauseLambda)?
 The original proposal is about writing a good ol' {{{case}}} and letting
 the compiler sugar a lambda in, and one-arg {{{\case}}} is a perfect fit
 for the job.

 At times like this I wish one could just upload a "plugin" package to
 Hackage and let the people decide...

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