Chris Martin
Chris Martin

Reputation: 30756

Why doesn't haddock generate HTML for some modules in base?

There are some modules in the base haddock that don't have documentation links. For example, GHC/Show.hs has haddock comments, but there is no documentation for the GHC.Show module on Hackage. Why not? Is this a bug?

Upvotes: 3

Views: 143

Answers (1)

Chris Martin
Chris Martin

Reputation: 30756

This is apparently intentional. It a result of this line in GHC/Show.hs:

{-# OPTIONS_HADDOCK hide #-}

Relevant excerpts from the haddock documentation:

Certain attributes may be specified for each module which affects the way that Haddock generates documentation for that module. Attributes are specified in a comma-separated list in an {-# OPTIONS_HADDOCK ... #-} pragma at the top of the module, either before or after the module description.

[...]

The following attributes are currently understood by Haddock:

  • hide

    Omit this module from the generated documentation, but nevertheless propagate definitions and documentation from within this module to modules that re-export those definitions.

[...]

Upvotes: 2

Related Questions