[GHC] #14091: When PolyKinds is on, suggested type signatures seem to require TypeInType

GHC ghc-devs at haskell.org
Wed Aug 16 19:15:04 UTC 2017


#14091: When PolyKinds is on, suggested type signatures seem to require TypeInType
-------------------------------------+-------------------------------------
        Reporter:  jberryman         |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.2.1
      Resolution:                    |             Keywords:  TypeInType,
                                     |  TypeErrorMessages
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 goldfire):

 It's not clear to me the best way to fix this. It's tempting to suppress
 kind quantification with `-XNoTypeInType` and to suppress `forall` with
 `-XNoExplicitForAll`. But simply suppressing all these might sometimes
 give us the wrong type. For example, suppose we want `forall (b :: Bool).
 Proxy b`. Just saying `Proxy b` is plain wrong.... and it seems hard to
 know, a priori, when it would be wrong.

 Easier would be to print out the type as-is, but then look at it to
 determine whether the user might need extra extensions and suggest those,
 too.... but that's not as good a user experience.

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


More information about the ghc-tickets mailing list