Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexported things are shown as exported #254

Closed
ghc-mirror opened this issue May 8, 2014 · 2 comments
Closed

Unexported things are shown as exported #254

ghc-mirror opened this issue May 8, 2014 · 2 comments

Comments

@ghc-mirror
Copy link

Original reporter: NeilMitchell

Given:

-- M1.hs --
{-# OPTIONS_HADDOCK hide #-}
module M1 where
foo :: Int
foo = 0
bar :: Int
bar = 0

-- M2.hs --
module M2(module M1) where
import M1(bar)

M2 only exports bar, but if I run haddock on M1/M2, then it shows M2 exporting both foo and bar. I ran into this bug with Shake, and moved to explicit export lists to work around it.

@ghc-mirror ghc-mirror self-assigned this May 8, 2014
@ghc-mirror
Copy link
Author

Original reporter: david.waern@

I'm working on a fix.

I'm also trying to fix the where M1 has an explicit export list with section headers and/or loose doc comments. Do you have an opinion on what should happen in that case? Should they appear in M2's documentation? Perhaps one wouldn't write such hidden modules but the issue also comes up when "partially" (like this) re-exporting non-hidden modules.

Both loose doc comments and section headers could potentially refer to things which are not re-exported, so they may become nonsensical when placed in the outer module. However one could probably quite reasonably say that section headers could be included if the resulting section in the outer module becomes is non-empty. Loose doc comments I think it's best to filter out.

@ghc-mirror
Copy link
Author

Original reporter: fuuzetsu@

Duplicate of #174

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant