Manage your hoogle index using the stack tool

Context: Before stack I stopped using hoogle locally because my index will somehow lose synchronization with installed packages. If I remember correctly, I had problems with different results in ghci , command line and cabal sandboxes.

Can I use the stack environment to manage my local hoogle databases?

+6
source share
1 answer

For the Hoogle part, I recommend using the latest version of git, which will become version 5. To install this, run:

 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 do this with Cabal instead of Stack, first run cabal install , set the haddock / hoogle in the Cabal configuration file to True and remove the stack exec bit.

+4
source

All Articles