Ticket #254 (closed defect: duplicate)

Opened 17 months ago

Last modified 11 months ago

Unexported things are shown as exported

Reported by: NeilMitchell Owned by:
Priority: major Milestone:
Version: 2.14.0 Keywords:
Cc: NeilMitchell



-- 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.

Change History

Changed 17 months ago by NeilMitchell

  • cc NeilMitchell added

Changed 17 months ago by 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.

Changed 11 months ago by Fūzetsu

  • status changed from new to closed
  • resolution set to duplicate

Duplicate of #174

Note: See TracTickets for help on using tickets.