Skip to content
This repository was archived by the owner on Aug 3, 2024. It is now read-only.
This repository was archived by the owner on Aug 3, 2024. It is now read-only.

Unexported things are shown as exported #254

Closed

Description

@ghc-mirror

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.

Activity

  1. self-assigned this
    on May 8, 2014
  2. ghc-mirror commented on May 8, 2014

    @ghc-mirror
    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.

  3. ghc-mirror commented on May 8, 2014

    @ghc-mirror
    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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions