[GHC] #9072: RankNTypes composition now requires ImpredicativeTypes

#9072: RankNTypes composition now requires ImpredicativeTypes -------------------------------------+------------------------------------- Reporter: gelisam | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type | Version: 7.8.2 checker) | Operating System: Unknown/Multiple Keywords: | Type of failure: GHC rejects Architecture: Unknown/Multiple | valid program Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | -------------------------------------+------------------------------------- {{{ {-# LANGUAGE RankNTypes #-} instantiateId :: (forall a. a -> a) -> Int -> Int instantiateId f = f passes :: [Int] -> [Int] passes = map (instantiateId id) -- Couldn't match type ‘a0 -> a0’ with ‘forall a. a -> a’ fails :: [Int] -> [Int] fails = (map . instantiateId) id }}} works with ghc 7.6, fails with ghc 7.8, works with ghc 7.8 + `ImpredicativeTypes`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9072 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9072: RankNTypes composition now requires ImpredicativeTypes ----------------------------------------------+---------------------------- Reporter: gelisam | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler (Type checker) | Version: 7.8.2 Resolution: invalid | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: GHC rejects valid program | Unknown/Multiple Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: ----------------------------------------------+---------------------------- Changes (by simonpj): * status: new => closed * resolution: => invalid Comment: This is, I guess, a bug in 7.6. You really do need impredicative instantiation for the application of `(.)` to work. So I don't think this is a bug in 7.8. Yell if you disagree. Simon -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9072#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC