[GHC] #11540: ghc accepts non-standard type without language extension

GHC ghc-devs at haskell.org
Sat Feb 6 00:15:15 UTC 2016


#11540: ghc accepts non-standard type without language extension
-------------------------------------+-------------------------------------
        Reporter:  augustss          |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.8.4
  (Parser)                           |
      Resolution:                    |             Keywords:
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 rwbarton):

 If we want to control this with a language extension, then
 `Rank2Types`/`RankNTypes` should be a good choice. After all we already
 have
 {{{
 Prelude> let f :: a -> Eq a => a; f = undefined

 <interactive>:4:10:
     Illegal polymorphic or qualified type: Eq a => a
     Perhaps you intended to use RankNTypes or Rank2Types
     In the type signature for ‘f’: f :: a -> Eq a => a
 }}}

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


More information about the ghc-tickets mailing list