[GHC] #8325: Pattern guards in anonymous functions

GHC ghc-devs at haskell.org
Sat Jan 23 18:58:49 UTC 2016


#8325: Pattern guards in anonymous functions
-------------------------------------+-------------------------------------
        Reporter:  mcollis           |                Owner:
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.6.3
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #7783, #10807     |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by thomie):

 * related:   => #7783, #10807


Comment:

 As pointed out in #10807, you can use curly braces:

 {{{
 {-# LANGUAGE MultiWayIf #-}

 x = if { |  True
          -> 1
          |  False
          -> 2 }
 }}}

 `MultiWayIf` was changed to use layout in #7783.

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


More information about the ghc-tickets mailing list