[GHC] #11398: Type application for operator sections

GHC ghc-devs at haskell.org
Sun Jan 10 16:46:05 UTC 2016


#11398: Type application for operator sections
-------------------------------------+-------------------------------------
           Reporter:  Iceland_jack   |             Owner:
               Type:  feature        |            Status:  new
  request                            |
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  7.10.3
           Keywords:                 |  Operating System:  Unknown/Multiple
  TypeApplications                   |
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 With `-fprint-explicit-foralls`

 {{{#!hs
 (+ 1) :: forall {a}. Num a => a -> a
 }}}

 This means we cannot apply it to a type:

 {{{#!hs
 (+ 1) @Int :: Int -> Int
 }}}

 Since sections are sugar `(+ 1)` could be given the type `forall a. Num a
 => a -> a` instead.

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


More information about the ghc-tickets mailing list