Skip to content
This repository has been archived by the owner on Nov 24, 2022. It is now read-only.

Latest commit

 

History

History
32 lines (28 loc) · 1.23 KB

README.md

File metadata and controls

32 lines (28 loc) · 1.23 KB

hs-src-tool

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.

How to use it

  1. Make sure that stack, cabal, haskell-code-indexer, haskell-code-server, and of course hs-src-tool are on your $PATH
  2. The tool is designed to be run from the root of Stack project:
    $ cd $PROJECT_ROOT
  3. Make sure that your project uses the same version of GHC as haskell-code-indexer and haskell-code-server!
  4. Build your project first:
    $ stack build
  5. Now fetch the sources:
    $ hs-src-tool fetch
  6. Sources shold be in $PROJECT_ROOT/.hs-src-tool folder
  7. Index your project and its dependencies
    $ hs-src-tool index
  8. Start the sources explorer
    $ hs-src-tool explore --port=8080 --ui=$PATH_TO_HASKELL_CODE_EXPLORER_REPO/javascript/release
  9. 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.