#6032: HEAD (7.5.20120421) requires RankNTypes for a rank-2 type
------------------------------+---------------------------------------------
 Reporter:  dreixel           |          Owner:                  
     Type:  bug               |         Status:  new             
 Priority:  normal            |      Component:  Compiler        
  Version:  7.5               |       Keywords:                  
       Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
  Failure:  None/Unknown      |       Testcase:                  
Blockedby:                    |       Blocking:                  
  Related:                    |  
------------------------------+---------------------------------------------
 While building syb with HEAD, Ian reported that he needed to use
 RankNTypes instead of Rank2Types. I minimized the problem to:
 {{{
 {-# LANGUAGE Rank2Types #-}

 module Rank2 where

 f :: (forall a. a -> (forall b. b)) -> c
 f = undefined

 g :: (forall a b. a -> b) -> c
 g = undefined
 }}}
 7.4 accepts both `f` and `g`. HEAD complains on the signature of `f`:
 {{{
     Illegal polymorphic or qualified type: forall b. b
     Perhaps you intended to use -XRankNTypes or -XRank2Types
     In the type signature for `f':
       f :: (forall a. a -> (forall b. b)) -> c
 }}}
 It doesn't complain about `g`, but I think the signatures are equivalent.
 Ian further reports that the change in behavior seems to have occurred
 after 7.5.20120401.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/6032>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to