[GHC] #4359: Implement lambda-case/lambda-if

GHC cvs-ghc at haskell.org
Fri Jul 13 12:24:33 CEST 2012


#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 jeltsch):

 Replying to [comment:73 simonpj]:
 > Concerning arrows, I do agree that (`proc case` ''alts'') as syntactic
 sugar for (`prox x -> case x of` ''alts'') would be consistent.  I don't
 know the arrow equivalent of multi-branch if would look like.  Want to
 flesh it out?

 And example using it would look like this:
 {{{
 proc x -> if | x >  0    -> f -< -1
              | x == 0    -> g -< 0
              | otherwise -> h -< 1
 }}}

 > '''However''' I am deeply reluctant to fiddle with the arrow code at
 all; there's a long-standing plan to refactor the arrow-handling code
 which is currently complex and crufy. If anyone arrow-keen person is
 willing to undertake this, I am happy to help. The ticket is #7071.

 I can imagine to help here, but I would like to be permitted to add
 support for arrow versions of lambda case and multi-branch if.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4359#comment:75>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler



More information about the Glasgow-haskell-bugs mailing list