[GHC] #4017: Unhelpful error message in GHCi
GHC
ghc-devs at haskell.org
Sun Oct 8 13:29:41 UTC 2017
#4017: Unhelpful error message in GHCi
-------------------------------------+-------------------------------------
Reporter: simonpj | Owner: supersven
Type: bug | Status: new
Priority: lowest | Milestone:
Component: Compiler | Version: 6.12.2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Incorrect | Unknown/Multiple
warning at compile-time | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by supersven):
Looks like things (or symptoms) changed a bit over time - The problem
seems to be the same.
Starting a current version of GHC in interactive mode:
{{{
[nix-shell:~/src/ghc]$ inplace/bin/ghc-stage2 --interactive
GHCi, version 8.3.20170930: http://www.haskell.org/ghc/ :? for help
}}}
`:i GHC.Integer.Type.Integer` now responds with a "Not in scope" error.
`:i Integer` still shows that `GHC.Integer.Type.Integer` is reachable:
{{{
Prelude> :i GHC.Integer.Type.Integer
<interactive>:1:1: error: Not in scope: ‘GHC.Integer.Type.Integer’
Prelude> :i Integer
data Integer
= integer-gmp-1.0.1.0:GHC.Integer.Type.S# GHC.Prim.Int#
| integer-gmp-1.0.1.0:GHC.Integer.Type.Jp# {-# UNPACK #-}integer-
gmp-1.0.1.0:GHC.Integer.Type.BigNat
| integer-gmp-1.0.1.0:GHC.Integer.Type.Jn# {-# UNPACK #-}integer-
gmp-1.0.1.0:GHC.Integer.Type.BigNat
-- Defined in ‘integer-gmp-1.0.1.0:GHC.Integer.Type’
instance Eq Integer
-- Defined in ‘integer-gmp-1.0.1.0:GHC.Integer.Type’
instance Ord Integer
-- Defined in ‘integer-gmp-1.0.1.0:GHC.Integer.Type’
instance Show Integer -- Defined in ‘GHC.Show’
instance Read Integer -- Defined in ‘GHC.Read’
instance Enum Integer -- Defined in ‘GHC.Enum’
instance Num Integer -- Defined in ‘GHC.Num’
instance Real Integer -- Defined in ‘GHC.Real’
instance Integral Integer -- Defined in ‘GHC.Real’
}}}
Setting the "integer-gmp" package doesn't change the situation:
{{{
Prelude> :set -package integer-gmp
package flags have changed, resetting and loading new packages...
Prelude> :i Integer
data Integer
= integer-gmp-1.0.1.0:GHC.Integer.Type.S# GHC.Prim.Int#
| integer-gmp-1.0.1.0:GHC.Integer.Type.Jp# {-# UNPACK #-}integer-
gmp-1.0.1.0:GHC.Integer.Type.BigNat
| integer-gmp-1.0.1.0:GHC.Integer.Type.Jn# {-# UNPACK #-}integer-
gmp-1.0.1.0:GHC.Integer.Type.BigNat
-- Defined in ‘integer-gmp-1.0.1.0:GHC.Integer.Type’
instance Eq Integer
-- Defined in ‘integer-gmp-1.0.1.0:GHC.Integer.Type’
instance Ord Integer
-- Defined in ‘integer-gmp-1.0.1.0:GHC.Integer.Type’
instance Show Integer -- Defined in ‘GHC.Show’
instance Read Integer -- Defined in ‘GHC.Read’
instance Enum Integer -- Defined in ‘GHC.Enum’
instance Num Integer -- Defined in ‘GHC.Num’
instance Real Integer -- Defined in ‘GHC.Real’
instance Integral Integer -- Defined in ‘GHC.Real’
Prelude> :i GHC.Integer.Type.Integer
<interactive>:1:1: error: Not in scope: ‘GHC.Integer.Type.Integer’
}}}
`GHC.Integer.Type` is still a hidden module:
{{{
Prelude> import GHC.Integer.Type
<no location info>: error:
Could not find module ‘GHC.Integer.Type’
it is a hidden module in the package ‘integer-gmp-1.0.1.0’
}}}
=== Summary ===
The error message of `:i GHC.Integer.Type.Integer` changed to "Not in
scope". But `:i Integer` still shows that the requested information would
be available.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/4017#comment:15>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list