[GHC] #4806: Make error message more user friendly when module is not found because package is unusable

GHC ghc-devs at haskell.org
Thu May 10 01:52:46 UTC 2018


#4806: Make error message more user friendly when module is not found because
package is unusable
-------------------------------------+-------------------------------------
        Reporter:  mitar             |                Owner:  (none)
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.0.1
      Resolution:                    |             Keywords:  newcomer
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by sgillespie):

 I can seem to reproduce the issue by running

 {{{
 cabal sandbox init
 cabal install MonadRandom
 cabal exec -- ghc-pkg unregister --force fail
 cabal repl
 }}}

 Then import anything from the now-unusable package

 {{{
 Prelude> :m + Control.Monad.Random

 <no location info>: error:
     Could not find module ‘Control.Monad.Random’
     Perhaps you meant
       Control.Monad.Reader (from mtl-2.2.2)
       Control.Monad.Cont (from mtl-2.2.2)
       Control.Monad.Error (from mtl-2.2.2)
 }}}

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


More information about the ghc-tickets mailing list