You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 3, 2024. It is now read-only.
I've just been trying to re-export modules with Haddock, but I ran into several annoying issues:
If you export renamed modules as in
module Foo (module X) where
import module A as X
import module B as X
documentation for A and B do not appear in the documentation for Foo.
If you export unrenamed modules, documentation for A and Bdoes appear in docs for Foo:
module Foo (module A, module B) where
import module A
import module B
If you import a module hiding some items, and then re-export the module, the hidden items still appear in the documentation:
module Foo (module A, module B) where
import module A hiding (a)
import module B
In this example, documentation for a would appear in the docs for Foo, even though a is not exported from Foo.
(All of this assumes that modules A and B are hidden in the cabal file, so that their contents should be dumped into Foo in an ideal world.)
It doesn't seem that (1) is addressed in the docs. In particular, the modules are re-exported "wholly and without hiding qualifiers", and the docs mention nothing about renamed modules.
Point (2) is precisely what I expect/want to happen, so nothing to change there.
Point (3) may be addressed in the footnote [2] in the docs (can't quite tell), but this feature is pretty useless with the current behavior. The only option is for me to explicitly list what items I want to export, which is error-prone and difficult to maintain.