This tool downloads sources of Stack project's dependencies to a .hs-src-tool folder and uses https://github.com/alexwl/haskell-code-explorer to index and browse them.
- Make sure that
stack,cabal,haskell-code-indexer,haskell-code-server, and of coursehs-src-toolare on your$PATH - The tool is designed to be run from the root of Stack project:
$ cd $PROJECT_ROOT
- Make sure that your project uses the same version of GHC as
haskell-code-indexerandhaskell-code-server! - Build your project first:
$ stack build
- Now fetch the sources:
$ hs-src-tool fetch
- Sources shold be in
$PROJECT_ROOT/.hs-src-toolfolder - Index your project and its dependencies
$ hs-src-tool index
- Start the sources explorer
$ hs-src-tool explore --port=8080 --ui=$PATH_TO_HASKELL_CODE_EXPLORER_REPO/javascript/release - Open http://localhost:8080 and enjoy!
Note that hs-src-tool tries its best to build and index as many packages as it can. Meaning that failing packages are skipped. If you don't see some specific package in the explorer - take a look on hs-src-tool index output.