You can generate all of the haskell haddock docs you need offline and search them with a shell function. Since Dash just added Haskell support I decided to share the lightweight approach that I use. The idea should work for both cabal and stack based workflows so long as you’ve generated haddocks for the package in question. I’ve written it for stack users.
In a project directory stackdoc will search local packages before checking user-level snapshot packages. For example, in a project that depends on GPipe you can call:
~/my/project/dir $ stackdoc GPipe
Search GPipe in ~/my/project/dir/.stack-work/install/x86_64-osx/nightly-2015-11-17/7.10.2/doc
To look up the MVar docs which are in the package base you can invoke:
~ $ stackdoc base
Search base in ~/.stack/global/.stack-work/install/x86_64-osx/lts-3.9/7.10.2/doc
Search base in ~/.stack/snapshots/x86_64-osx/lts-3.9/7.10.2/doc
The utility of this command comes from being able to launch your browser. The default command just prints Found ..., but you can specify your own.
~ $ stackdoc $PACKAGE chromium
Finally, if you can’t find docs for a package it is possible the haddocks have yet to be generated. Try running: