haskell / haskell/cabal

Using `--haddock-internal` with testsuite

Open
#11,485 2 comments 0 reactions 0 assignees View on GitHub
cabal-install: cmd/haddock type: bug
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

**Describe the bug**
Using `--haddock-internal` doesn't include unexported items from `cabal-install/tests/UnitTests/Distribution/Solver/Modular/Solver.hs`.

> --haddock-internal
> Build haddock documentation which includes unexposed modules and symbols.
> SOURCE: https://cabal.readthedocs.io/en/latest/cabal-project-description-file.html#cfg-flag---haddock-internal

**To Reproduce**
```
$ cabal haddock cabal-install:test:unit-tests --haddock-internal
```

I get these docs:

Image

If I delete the explicit export list for that module then I see a lot more.

```diff
git diff
diff --git a/cabal-install/tests/UnitTests/Distribution/Solver/Modular/Solver.hs b/cabal-install/tests/UnitTests/Distribution/Solver/Modular/Solver.hs
index 691d9b1d3..7b9fc83a2 100644
--- a/cabal-install/tests/UnitTests/Distribution/Solver/Modular/Solver.hs
+++ b/cabal-install/tests/UnitTests/Distribution/Solver/Modular/Solver.hs
@@ -3,7 +3,7 @@
-- | This is a set of unit tests for the dependency solver,
-- which uses the solver DSL ("UnitTests.Distribution.Solver.Modular.DSL")
-- to more conveniently create package databases to run the solver tests on.
-module UnitTests.Distribution.Solver.Modular.Solver (tests)
+module UnitTests.Distribution.Solver.Modular.Solver
where
```

This is just a snippet of the top of a long page:

Image

**Expected behavior**
I'd expect to see the unexported items with haddocks.

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.