Search code examples
haskellsandboxcabal

View documentation of packages installed into a cabal sandbox


Is there a way to view the documentation of any package I installed in a cabal sandbox? Currently I have a script that places the documentation in a common path so I can view it with a simple server script, but I imagine there's a better or more accepted way of doing this.

To be clear, I do not mean cabal-dev, but the sandboxing tools in the latest cabal.


Solution

  • If you install packages into sandbox with documentation enabled (cabal install --enable-documentation or documentation: True in ./cabal.config), the generated documentation will be put under ./.cabal-sandbox/share/doc/$arch-$os-$compiler/$pkigid. In other words, this works in the same way as with the user package DB (one exception is that a local documentation index is not created in the sandbox case - this is a known issue).