#2445: better error message needed for missing package files
------------------------+---------------------------------------------------
Reporter: duncan | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 6.8.3 | Severity: normal
Keywords: | Testcase:
Architecture: Unknown | Os: Unknown
------------------------+---------------------------------------------------
Here's a real user's confusion:
{{{
~ $ ghci
GHCi, version 6.8.2: http://www.haskell.org/ghc/ :? for help
Loading package base ... linking ... done.
Prelude> :module Network
Could not find module `Network':
Use -v to see a list of the files searched for.
Prelude> Leaving GHCi.
~ $ ghc-pkg list network
/usr/lib/ghc-6.8.2/package.conf:
network-2.1.0.0
/home/sjm/.ghc/i386-linux-6.8.2/package.conf:
network-2.2.0.0
}}}
Turns out the problem is that the `network-2.2.0.0` package that is
registered locally is messed up, the .hi files are missing, probably
accidentally deleted.
In this situation the error message is not very helpful. The current error
message makes sense in the context of local files since there is is quite
reasonable for them to not exist however it's no good at all for the case
of a module from a package. We know that the package exports that module
so the file had better exist and if it does not, it's not simply a case of
a missing file, the package is totally borked. The user needs to know that
the package is borked so that they can unregister or reinstall it. The
current message does not alert them to the real problem.
The message should say which package (including version) claims to provide
the module and that files are missing from the installed package and as
such the package is unusably broken and should be reinstalled.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2445>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs