Document haddock-options
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
**Describe the bug**
I do not know whether to add an idea to a .cabal file or to a cabal.project file.
More concretely: I needed to pass an extra flag to haddock during documentation building. Given the existence of `ghc-options` in a .cabal file, I tried a `haddock-options` field there. That did not work. Instead, I had to make a `cabal.project` file with a `package` stanza and put the `haddock-options` in the stanza.
`haddock-options` is not listed in https://cabal.readthedocs.io/en/3.4/cabal-package.html, but all users of my package will need this haddock option, so somehow cabal.project seems like the wrong place. (My understanding, which might be flawed, is that cabal.project should be for local options, while .cabal is for options that go with the package.)
`haddock-options` is also not listed in https://cabal.readthedocs.io/en/3.4/cabal-project.html, even though it is actually allowed there.... but I was able to figure things out based on the gloss "In general, the accepted field names coincide with the accepted command line flags that cabal install and other commands take." at the top of that page.
**Expected behavior**
I would expect `haddock-options` to be accepted in a .cabal file. But if that's the wrong design, then I would still expect `haddock-options` to be documented in the manual.
**Additional context**
Really, I'm trying to get cabal to play nicely with plugins, but that's beyond just this ticket.
Contributor guide
Assessment
This issue has not been assessed yet.