what does the hidden package error mean?

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-0.9.1.4, 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.
On Fri, Apr 10, 2009 at 1:36 PM, Anatoly Yakovenko
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-0.9.1.4, which is hidden
what does "hidden" mean? why does this work in ghci
import Data.ByteString import Data.ByteString.Char8
without any problems

I agree, a better error message (or something less cryptic w.r.t. the
new guy) would be very nice.
--Deniz
2009/4/10 Anatoly Yakovenko
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.
On Fri, Apr 10, 2009 at 1:36 PM, Anatoly Yakovenko
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-0.9.1.4, which is hidden
what does "hidden" mean? why does this work in ghci
import Data.ByteString import Data.ByteString.Char8
without any problems
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Anatoly Yakovenko
On Fri, Apr 10, 2009 at 1:36 PM, Anatoly Yakovenko
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-0.9.1.4, 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.

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).

I assume you're using cabal, which hides all packages by default. Add "bytestring" or "bytestring >= 0.9.*" or something along those lines to Build-Depends in your .cabal file. If you're not using cabal, I'm not sure why it would be hidden, but you can unhide with -package bytestring to GHC. -Ross On Apr 10, 2009, at 4:36 PM, Anatoly Yakovenko 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-0.9.1.4, which is hidden
what does "hidden" mean? why does this work in ghci
import Data.ByteString import Data.ByteString.Char8
without any problems _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
participants (5)
-
Achim Schneider
-
Anatoly Yakovenko
-
Claus Reinke
-
Deniz Dogan
-
Ross Mellgren