For the Hoogle part I recommend using the latest git version, which will become version 5. To install that, do:
git clone https://github.com/ndmitchell/hoogle.git
cd hoogle
stack init
stack install
Then generate it and use it with:
# generate Haddock docs for all your packages
stack haddock
# generate the Hoogle index
stack exec -- hoogle generate --local --database=.stack-work/hoogle
# perform a search for map
stack exec -- hoogle map --database=.stack-work/hoogle
# start a server at http://127.0.0.1/ to browse docs
stack exec -- hoogle server --local --database=.stack-work/hoogle
To make this work with Cabal instead of Stack, do cabal install
initially, set your haddock
/hoogle
preference in your Cabal config file to True
, and remove the stack exec
bits.