[Haskell-cafe] Re: what does the hidden package error mean?

Achim Schneider barsoap at web.de
Sat Apr 11 09:35:49 EDT 2009

Anatoly Yakovenko <aeyakovenko at gmail.com> wrote:

> On Fri, Apr 10, 2009 at 1:36 PM, Anatoly Yakovenko
> <aeyakovenko at gmail.com> wrote:
> > I am trying to build ParseP on the latest ghc, and i am getting
> > this error:
> >
> > Text/ParserCombinators/ParseP/Interface.hs:26:17:
> > __ __Could not find module `Data.ByteString.Char8':
> > __ __ __it is a member of package bytestring-, which is hidden
> >
> > what does "hidden" mean? __why does this work in ghci
> >
> >> import Data.ByteString
> >> import Data.ByteString.Char8
> >>
> >
> > without any problems
> >
> Ah, bytestring was missing from the build-depends,
> 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.

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.

[1] For UNIX fundamentalists, like me, MUST NOT

(c) this sig last receiving data processing entity. Inspect headers
for copyright history. All rights reserved. Copying, hiring, renting,
performance and/or quoting of this signature prohibited.

More information about the Haskell-Cafe mailing list