Ticket #4017 (new bug)
Unhelpful error message in GHCi
| Reported by: | simonpj | Owned by: | |
|---|---|---|---|
| Priority: | lowest | Milestone: | 7.6.2 |
| Component: | Compiler | Version: | 6.12.2 |
| Keywords: | Cc: | ||
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | None/Unknown | Difficulty: | |
| Test Case: | Blocked By: | ||
| Blocking: | Related Tickets: |
Description
John Launchbury encountered an unhelpful error message in GHCi. Try this:
*Test> :i GHC.Integer.Type.Integer
Top level:
Failed to load interface for `GHC.Integer.Type':
it is a hidden module in the package `integer-gmp'
Use -v to see a list of the files searched for.
*Test>
Two points
- The "-v" suggestion is no help at at all: a straightforward response is to try
*Test> :i -v GHC.Integer.Type.Integer
But that does not work. Either it should work, or the error message should say "Try :set -v to see a list..."
- In any case, since we know it's a hidden module, it'd be more helpful to suggest "Possible fix: use :set -package integer-gmp.
It's also confusing that if you instead say:
*Test> :i Integer data Integer = integer-gmp:GHC.Integer.Type.S# GHC.Prim.Int# | integer-gmp:GHC.Integer.Type.J# GHC.Prim.Int# GHC.Prim.ByteArray# -- Defined in integer-gmp:GHC.Integer.Type instance Enum Integer -- Defined in GHC.Num instance Eq Integer -- Defined in GHC.Num instance Integral Integer -- Defined in GHC.Real instance Num Integer -- Defined in GHC.Num instance Ord Integer -- Defined in GHC.Num instance Read Integer -- Defined in GHC.Read instance Real Integer -- Defined in GHC.Real instance Show Integer -- Defined in GHC.Num *Test>
you get the info. So specifying the full name doesn't work (saying it can't load an interface) but the unqualified one does (which presumably involves loading the interface). Strange.
All in 6.12.
Simon
Change History
Note: See
TracTickets for help on using
tickets.
