hoogle generate --haddock=path/to/doc works similarly to hoogle generate --local, getting package info from a local ghc-pkg database, but uses path/to/doc as the canonical source of Haddock documentation. path/to/doc should be a path to the directory that contains the root index.html generated by cabal haddock or stack haddock. Paths stored in the database are relative to this root.
hoogle server --haddock=path/to/doc is intended to be used with a database containing relative paths. In contrast to hoogle server --local, paths relative to the filesystem root are not allowed; only files from path/to/doc are served.
These features are intended to be used together, when you want to create a Hoogle index for your project in one place, then serve it somewhere else. This enables a workflow such as the following:
Run cabal haddock or stack haddock on your build server
Run hoogle generate --haddock=path/to/doc on your build server (this assumes you know where the docs were written)
Deploy the Hoogle database and Haddock files to your documentation server & run hoogle server --haddock=new/path/to/doc
hoogle generate --haddock=path/to/doc
works similarly tohoogle generate --local
, getting package info from a local ghc-pkg database, but usespath/to/doc
as the canonical source of Haddock documentation.path/to/doc
should be a path to the directory that contains the rootindex.html
generated bycabal haddock
orstack haddock
. Paths stored in the database are relative to this root.hoogle server --haddock=path/to/doc
is intended to be used with a database containing relative paths. In contrast tohoogle server --local
, paths relative to the filesystem root are not allowed; only files frompath/to/doc
are served.These features are intended to be used together, when you want to create a Hoogle index for your project in one place, then serve it somewhere else. This enables a workflow such as the following:
cabal haddock
orstack haddock
on your build serverhoogle generate --haddock=path/to/doc
on your build server (this assumes you know where the docs were written)hoogle server --haddock=new/path/to/doc