RankNTypes composition now requires ImpredicativeTypes
{-# 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
.
Trac metadata
Trac field | Value |
---|---|
Version | 7.8.2 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler (Type checker) |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |