
what a confusing error message, can we change it to say "package Foo is missing from the MyPackage.cabal build-depends" would be a lot more obvious how to fix it.
The problem is that ghc doesn't know that, and shouldn't[1]: All it sees is a -hide-all-packages on its command line, you can witness it by calling cabal with the -v flag.
Yes, but the user is calling cabal, not ghc - isn't it cabal's task to interpret any error messages from tools it uses internally and to present them (cabal knows that it has passed -hide-all-packages, and is therefore able to interpret ghc's error message; the user doesn't/shouldn't need to know about these internal details)? I once suggested an error-handling wrapper for this purpose http://www.haskell.org/pipermail/cabal-devel/2007-December/001498.html but in the absence of
OTOH, having some cross-compiler, machine-readable format to describe errors would enable cabal to do some holding of hands, as well as save ide developers from having to write all these boring parsers.
Duncan seemed rather unhappy about the idea of doing a simple regexp-based error-message-pattern-to-cabal-level explanation;-) Mostly, he wanted to focus cabal hacking resources on less ad-hoc tasks, but I still think fleshing this out would make a helpful cabal feature.. Claus ps. there was a hacked-up sketch of such a script at the end of the thread, but it seems to have used the wrong encoding for the mailinglist archives. I think it was the wrapper code attached to this message (which matches for the kind of error message to check if there is a known suggestion for it - the rule set could have been extended whenever issues became faqs).