haskell / haskell/cabal

Improving cabal haddock UX

Open
#8,299 7 comments 3 reactions 0 assignees View on GitHub
cabal-install: cmd/haddock re: user experience type: enhancement
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

I think that it is currently very cumbersome to look up the documentation of packages locally. The biggest problem is that it is rather hard to find the documentation files of dependencies.

The current situation is that running `cabal haddock` on a local project shows the path to the documentation index of that project after compiling. However, it does not show the path to the documentation of dependencies and does also not show the path if nothing needs to be compiled.

Discovering local haddock documentation would be much simpler if:
1. `cabal haddock` would always show the path to the documentation of the project, regardless if compilation was necessary or not.
2. `cabal haddock text` would show the path for the `text` documentation.

Additionally, it would be nice if cabal had a flag to automatically open the documentation after compiling. For example, `cabal haddock text --open` should open the documentation for `text`.

The `--open` functionality seems to have been implemented in https://github.com/haskell/cabal/issues/7366, but current cabal(3.6.2.0) does not have this functionality.

What do you think about my suggestions?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.