haskell / haskell/cabal

`cabal haddock` help text suggests flags that don't work

Open
#9,246 1 comment 1 reaction 0 assignees View on GitHub
cabal-install: cmd/haddock re: options type: bug
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

**Describe the bug**

`cabal haddock` suggests several flags that it does not recognize.

**To Reproduce**
Steps to reproduce the behavior:

```
λ cabal haddock --help | head -n20
Build Haddock documentation.

Usage: cabal haddock [FLAGS] TARGET

Build Haddock documentation for the specified packages within the project.

Any package in the project can be specified. If no package is specified, the
default is to build the documentation for the package in the current
directory. The default behaviour is to build documentation for the exposed
modules of the library component (if any). This can be changed with the
'--internal', '--executables', '--tests', '--benchmarks' or '--all' flags.

λ haddock --internal
Error: cabal: unrecognized 'haddock' option `--internal'

λ haddock --executables
Error: cabal: unrecognized 'haddock' option `--executables'

λ haddock --tests
Error: cabal: unrecognized 'haddock' option `--tests'

λ haddock --benchmarks
Error: cabal: unrecognized 'haddock' option `--benchmarks'

λ haddock --all
Error: cabal: option `--all' is ambiguous; could be one of:
--allow-depending-on-private-libs
Allow depending on private libraries. If set,
the library visibility check MUST be done
externally.
--allow-older[=DEPS] Ignore lower bounds in all dependencies or
DEPS
--allow-newer[=DEPS] Ignore upper bounds in all dependencies or
DEPS
--allow-boot-library-installs Enable Allow cabal to install base, ghc-prim,
integer-simple, integer-gmp, and
template-haskell.

```

**Expected behavior**

The help text and accepted CLI arguments agree

**System information**
- Operating system: Ubuntu
- `cabal`, `ghc` versions: `cabal-install-3.10.1.0`

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.