inconsistent type error messages between ghc and ghci
When building syb 0.3.6 with todays head / 7.5 I get different type error messages for the module Data/Generics/Twins.hs respectively from ghc when doing cabal install syb vs when i load that module into ghci
ghc:
src/Data/Generics/Twins.hs:202:14:
Illegal polymorphic or qualified type: GenericT
Perhaps you intended to use -XRankNTypes or -XRank2Types
In the type signature for `gzipWithT': gzipWithT :: GenericQ (GenericT) -> GenericQ (GenericT)
src/Data/Generics/Twins.hs:213:14: Illegal polymorphic or qualified type: GenericM m Perhaps you intended to use -XRankNTypes or -XRank2Types In the type signature for `gzipWithM':
gzipWithM | Monad m =\> |
---|---|
GenericQ (GenericM m) -\> GenericQ (GenericM m) |
src/Data/Generics/Twins.hs:223:14:
Illegal polymorphic or qualified type: GenericQ r
Perhaps you intended to use -XRankNTypes or -XRank2Types
In the type signature for `gzipWithQ': gzipWithQ :: GenericQ (GenericQ r) -> GenericQ (GenericQ [r])
src/Data/Generics/Twins.hs:265:9: Illegal polymorphic or qualified type: GenericM Maybe Perhaps you intended to use -XRankNTypes or -XRank2Types In the type signature for `gzip':
gzip :: GenericQ (GenericM Maybe) -> GenericQ (GenericM Maybe)
--- interestingly, rank2types is infact enabled in that module.
whereas when the module is loaded into ghci, I get a very different error message
Loading package base ... linking ... done. [1 of 2] Compiling Data.Generics.Aliases ( Data/Generics/Aliases.hs, interpreted ) [2 of 2] Compiling Data.Generics.Twins ( Data/Generics/Twins.hs, interpreted )
Data/Generics/Twins.hs:118:12: Not in scope: type variable `b'
Data/Generics/Twins.hs:118:17: Not in scope: type variable `a'
Data/Generics/Twins.hs:118:39: Not in scope: type variable `b'
Data/Generics/Twins.hs:118:42: Not in scope: type variable `a'
irrespective of fixing the type error (i hope to sort that out this evening), the type error message should be the same between ghc and ghci in this instance right?
Trac metadata
Trac field | Value |
---|---|
Version | 7.5 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |