Opened 6 years ago

Closed 6 years ago

Last modified 6 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: Difficulty: Unknown
Test Case: tcfail127, tcfail184, tcfail195, tcfail197 Blocked By:
Blocking: Related Tickets:

Description

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 6 years ago by simonpj

  • Difficulty set to Unknown
  • Owner set to simonpj

Good idea. I'm fixing this.

S

comment:2 Changed 6 years ago by simonpj

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

Done

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

Simon

comment:3 Changed 6 years ago by simonmar

  • Architecture changed from Unknown to Unknown/Multiple

comment:4 Changed 6 years ago by simonmar

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