3.8. Module Attributes

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 a -- # (or {- # ... -}) comment at the top of the module, either before or after the module description. For example:

-- #hide, prune, ignore-exports

-- |Module description
module A where

The options and module description can be in either order, but remember to separate them using a blank line if you are using the -- style comments. Without the blank line in the example above, the module description would be assumed to be part of the options, and Haddock would complain about unrecognised options.

The following attributes are currently understood by Haddock:


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


Omit definitions that have no documentation annotations from the generated documentation.


Ignore the export list. Generate documentation as if the module had no export list - i.e. all the top-level declarations are exported, and section headings may be given in the body of the module.

Indicates that the current module should not be considered to be the home module for each entity it exports, unless that entity is not exported from any other module. See Section 3.6, “Hyperlinking and re-exported entities” for more details.