|
#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 [hidden email] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs |
|
#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: | -----------------------------------------+---------------------------------- Comment(by carter): interestingly, when I add ScopedTypeVariables to the language pragma, ghci's type error agrees with the ghc type error. -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/6046#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler _______________________________________________ Glasgow-haskell-bugs mailing list [hidden email] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs |
|
In reply to this post by GHC
#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: | -----------------------------------------+---------------------------------- Comment(by carter): this isn't relevant to this bug, but the type error associated with the bug goes away if the Language pragma for Data.Generics.Twins is changed from Rank2Types to RankNTypes -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/6046#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler _______________________________________________ Glasgow-haskell-bugs mailing list [hidden email] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs |
|
In reply to this post by GHC
#6046: inconsistent type error messages between ghc and ghci
----------------------------------------+----------------------------------- Reporter: carter | Owner: Type: bug | Status: closed Priority: normal | Component: Compiler Version: 7.5 | Resolution: invalid Keywords: | Os: MacOS X Architecture: x86_64 (amd64) | Failure: Incorrect result at runtime Testcase: see problem description | Blockedby: Blocking: | Related: ----------------------------------------+----------------------------------- Changes (by dreixel): * status: new => closed * resolution: => invalid Comment: The syb.cabal file (see http://hackage.haskell.org/packages/archive/syb/0.3.6/syb.cabal) mentions the extension `ScopedTypeVariables`, but if you load the file on GHCi you won't get this. This explains the difference in behaviour between `cabal install` and just loading the file on GHCi. The `RankNTypes` error itself is already reported as #6032. I think the best thing to do is to change `syb`; I'll release an updated version today. -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/6046#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler _______________________________________________ Glasgow-haskell-bugs mailing list [hidden email] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs |
|
In reply to this post by GHC
#6046: inconsistent type error messages between ghc and ghci
----------------------------------------+----------------------------------- Reporter: carter | Owner: Type: bug | Status: closed Priority: normal | Component: Compiler Version: 7.5 | Resolution: invalid Keywords: | Os: MacOS X Architecture: x86_64 (amd64) | Failure: Incorrect result at runtime Testcase: see problem description | Blockedby: Blocking: | Related: ----------------------------------------+----------------------------------- Comment(by carter): that clarifies things. thanks! -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/6046#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler _______________________________________________ Glasgow-haskell-bugs mailing list [hidden email] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs |
| Powered by Nabble | Edit this page |
