[GHC] #7137: Unnecessary -XRank2Types requirement involving type alias containing "forall" from another module
GHC
cvs-ghc at haskell.org
Mon Aug 20 15:22:04 CEST 2012
#7137: Unnecessary -XRank2Types requirement involving type alias containing
"forall" from another module
----------------------------------------+-----------------------------------
Reporter: joeyadams | Owner: simonpj
Type: bug | Status: closed
Priority: highest | Milestone: 7.6.1
Component: Compiler | Version: 7.7
Resolution: wontfix | Keywords:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
Failure: GHC rejects valid program | Difficulty: Unknown
Testcase: | Blockedby:
Blocking: | Related:
----------------------------------------+-----------------------------------
Changes (by simonpj):
* status: new => closed
* resolution: => wontfix
Comment:
Joey is right that `Int -> forall a. a` is technically a rank-1 type.
But #5957 complained about a rank-1 type of this sort, in fact more like
`Int -> Ord a => a -> a`, that was accepted without any flags. And that
does seem wrong.
So I did the technically-incorrect thing of requiring `Rank2Types` or
`RankNTypes` if you want a forall after an arrow. It just doesn't seem
worth the flaggery to allow only rank-1 types, but with foralls after
arrows.
I propose not to fix this unless it's very painful for some reason. Re-
open if so. I will improve the documentation though.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7137#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list