Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#2538 closed feature request (fixed)

Better error message for missing Rank2Types (or RankNTypes) flag

Reported by: tim Owned by: simonpj
Priority: normal Milestone:
Component: Compiler (Type checker) Version: 6.8.2
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Test Case: tcfail127, tcfail184, tcfail195, tcfail197
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


For a rank-2 type signature when the Rank2Types language option isn't enabled, GHC gives:

    Illegal polymorphic or qualified type: (Data a) => a -> RnM a
    In the type signature for `rnVarsIn':
      rnVarsIn :: ((Data a) => a -> RnM a)
                  -> [Vdef] -> Exp -> S.Set Var -> RnM ([Vdef], Exp)

It would be good to suggest using -XRank2Types or -XRankNTypes. (Sorry if this is already fixed; I don't have a working HEAD to test it with.)

Change History (4)

comment:1 Changed 8 years ago by simonpj

  • difficulty set to Unknown
  • Owner set to simonpj

Good idea. I'm fixing this.


comment:2 Changed 8 years ago by simonpj

  • Resolution set to fixed
  • Status changed from new to closed
  • Test Case set to tcfail127, tcfail184, tcfail195, tcfail197


Wed Aug 27 16:30:51 BST 2008
  * Fix Trac #2538: better error messages when validating types


comment:3 Changed 8 years ago by simonmar

  • Architecture changed from Unknown to Unknown/Multiple

comment:4 Changed 8 years ago by simonmar

  • Operating System changed from Unknown to Unknown/Multiple
Note: See TracTickets for help on using tickets.