[GHC] #11669: Incorrectly suggests RankNTypes for ill-formed type "forall a. Eq a. Int"

GHC ghc-devs at haskell.org
Sat May 7 22:41:54 UTC 2016


#11669: Incorrectly suggests RankNTypes for ill-formed type "forall a. Eq a. Int"
-------------------------------------+-------------------------------------
        Reporter:  Iceland_jack      |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.1
  (Parser)                           |
      Resolution:                    |             Keywords:  newcomer
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Incorrect         |  Unknown/Multiple
  warning at compile-time            |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #3155             |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by thomie):

 * keywords:   => newcomer
 * failure:  None/Unknown => Incorrect warning at compile-time
 * component:  Compiler => Compiler (Parser)
 * related:   => #3155


Comment:

 This could be easy to fix:
  * Suggest `ExplicitForAll` instead of `RankNTypes`.
  * Only suggest `ExplicitForAll` if `ExplicitForAll` isn't set yet.

 For a newcomer: the code is `compiler/parser/Parser.y`. Search for
 `RankNTypes`, and see the function `hintExplicitForall` for inspiration.
 Don't forget a test!

 The last real change to this code was in
 6c06fdc7ad20682f0f52b5a78e5e3487a2ed047b (#3155).

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


More information about the ghc-tickets mailing list