[GHC] #15055: ghci - improve error on hidden package

GHC ghc-devs at haskell.org
Thu Apr 19 08:03:54 UTC 2018


#15055: ghci - improve error on hidden package
-------------------------------------+-------------------------------------
           Reporter:  akfp           |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:  8.6.1
          Component:  GHCi           |           Version:  8.2.2
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 A user boldly types:

 {{{
 > import Data.Foo

 <no location info>: error:
     Could not find module ‘Data.Foo’
     It is a member of the hidden package ‘package-foo-0.1.0.0 at package-
 foo-0.1.0.0-5Itxx5SAgKEAspB2MHVKqi’.
 }}}

 The above error message is rather useless for a newcomer to ghci. After
 lots of googling, the user figures that `:set -v -package package-foo`
 seems to solve it.

 The original error should be:

 {{{
 > import Data.Foo

 <no location info>: error:
     Could not find module ‘Data.Foo’
     It is a member of the hidden package ‘package-foo-0.1.0.0 at package-
 foo-0.1.0.0-5Itxx5SAgKEAspB2MHVKqi’.
 Try :set -package package-foo to make it visible.
 }}}

 Or something like that.

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15055>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list