[GHC] #11350: Allow visible type application in patterns

GHC ghc-devs at haskell.org
Thu Jan 21 19:41:58 UTC 2016


#11350: Allow visible type application in patterns
-------------------------------------+-------------------------------------
        Reporter:  Iceland_jack      |                Owner:
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.1
      Resolution:                    |             Keywords:
                                     |  TypeApplications PatternSynonyms
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Iceland_jack):

 While commenting on #11441, what about lambdas?

 {{{#!hs
 -- Should work, given proposal.
 id :: forall a. a -> a
 id @a x = x

 -- Also.
 id :: forall a. a -> a
 id (@ a) (x :: a) = x

 -- What about this?
 id :: forall a. a -> a
 id = \ (@ a) (x :: a) -> x

 -- Or this
 id :: b -> b
 id = \ (@ a) (x :: a) -> x
 }}}

 Same question extends to `LambdaCase`.

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


More information about the ghc-tickets mailing list