#6046: inconsistent type error messages between ghc and ghci
-----------------------------------------+----------------------------------
Reporter: carter | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 7.5 | Keywords:
Os: MacOS X | Architecture: x86_64 (amd64)
Failure: Incorrect result at runtime | Testcase: see problem
description
Blockedby: | Blocking:
Related: |
-----------------------------------------+----------------------------------
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?
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/6046>
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