Stop! Tickets are now managed at GitHub.

Please enter new tickets, and find and edit existing tickets there:

Ticket #191 (new defect)

Opened 2 years ago

Last modified 2 years ago

Users confused by presence of Data.Binary in docs, but not in platform

Reported by: Laurentg Owned by: dcoutts
Priority: minor Milestone: 2012.4.0.0
Component: Policy Keywords: hidden package


After installing from scratch, creating a file with the following content:

import Data.Binary.Get

(Yes, nothing else.) and running it through ghc results in the following error message:

$> runghc test.hs 
    Could not find module `Data.Binary.Get':
      It is a member of the hidden package `ghc-binary-'.
      Use -v to see a list of the files searched for.

Running it this way works fine though:

laurent@IceShelf: openGL1$ runghc -package ghc-binary- test.hs
<interactive>:1:42: Not in scope: `main'

I am not sure why this package is hidden?

Since it is part of the Haskell Platform installation and fully visible in the corresponding locally installed docs one would expect it either to not be hidden or to have some mention in its documentation that it is hidden and thus requires an additional flag to be visible from GHC.

Change History

Changed 2 years ago by Laurentg

  • cc… added

Changed 2 years ago by MtnViewMark

  • owner changed from dons to MtnViewMark
  • status changed from new to assigned

The binary package is not part of either Haskell Platform, or the public interface of GHC.

GHC, it turns out, uses a version of the package, called ghc-binary, for its internal work, but it isn't exposed. Note that you shouldn't build software using that package, as it isn't necessarily in sync with the package called binary on Hackage, which is what most users will have.

It is perhaps a problem that it is exposed in the docs. I'll look into that further, and figure out where that is happening (not sure if it is in the GHC packaging process or the HP packaging process.)

Changed 2 years ago by MtnViewMark

  • milestone set to 2012.2.0.0

Changed 2 years ago by MtnViewMark

  • status changed from assigned to new
  • component changed from Platform to Policy
  • summary changed from Using Data.Binary.Get requires --package option on HP 2011. 64 bits OS X to Users confused by presence of Data.Binary in docs, but not in platform
  • priority changed from major to minor
  • milestone changed from 2012.2.0.0 to 2012.4.0.0
  • owner changed from MtnViewMark to dcoutts

GHC ships with the binary package. The pack is no longer renamed ghc-binary, and as shipped, is included in the generated documentation. When incorporated into HP releases, users see documentation for Data.Binary in the docs.

In prior releases, the package was hidden by default. This caused confusion where the doc was available, but the package not usable in ghci, and required a "strange" package name (ghc-binary) to enable in ghci, or with .cabal based projects.

With GHC 7.4.2 / HP 2012.2.0.0, the package is no longer hidden by default (and is named binary). As such, should we no consider it part of the platform?

Note: See TracTickets for help on using tickets.