Skip to content

Commit

Permalink
Added documentation of haddocks command.
Browse files Browse the repository at this point in the history
  • Loading branch information
coot committed Jun 11, 2022
1 parent 90f8d65 commit 3aaf98a
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions doc/cabal-commands.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ legacy sections. We talk in detail about some global and package commands.

freeze Freeze dependencies.
haddock Build Haddock documentation.
haddock-project Build Haddock documentation of local packages.
exec Give a command access to the store.
list-bin List path to a single executable.

Expand Down Expand Up @@ -581,6 +582,31 @@ If a target is not a library :cfg-field:`haddock-benchmarks`,
:cfg-field:`haddock-executables`, :cfg-field:`haddock-internal`,
:cfg-field:`haddock-tests` will be implied as necessary.

cabal haddock-project
---------------------

``cabal haddock-project [FLAGS]`` builds Haddock documentation for all local
packages specified in the project.

By default the documentation will be put in ``./haddocks`` folder, this can be
modified with the ``--output`` flag.

This command supports two primary modes: building a self contained directory
(by specifying ``--local`` flag) or documentation that links to hackage (with
``--hackage`` flag). Both options imply: ``--quickjump``, ``--gen-index``,
``--gen-contents`` and ``--hyperlinked-source``.

If neither ``--local`` nor ``--hackage`` option is specified a self contained
directory will only be build if ``--html-location`` is not specified.

In both cases the html index as well as quickjump index will include all terms
and types defined in any of the local packages, but not ones that are included
in any of the dependencies. But note that if you navigate to a dependency,
you will have access to its quickjump index.

The generated landing page will contain one tree of all modules per local
package.

cabal exec
----------

Expand Down

0 comments on commit 3aaf98a

Please sign in to comment.