From 6319cccbd95ba15db6f34101577034233cdc8f88 Mon Sep 17 00:00:00 2001 From: David Waern Date: Thu, 16 Oct 2008 20:58:42 +0000 Subject: Fix #61 We were not getting docs for re-exported class methods. This was because we were looking up the docs in a map made from the declarations in the current module being rendered. Obviously, re-exported class methods come from another module. Class methods and ATs were the only thing we were looking up using the doc map, everything else we found in the ExporItems. So now I've put subordinate docs in the ExportItem's directly, to make things a bit more consistent. To do this, I added subordinates to the the declarations in the declaration map. This was easy since we were computing subordinates anyway, to store stand-alone in the map. I added a new type synonym 'DeclInfo', which is what we call what is now stored in the map. This little refactoring removes duplicate code to retrieve subordinates and documentation from the HsGroup. --- tests/tests/Hidden.hs | 2 + tests/tests/Ticket61.hs | 3 + tests/tests/Ticket61.html.ref | 125 +++++++++++++++++++++++++++++++++++++++++ tests/tests/Ticket61_Hidden.hs | 7 +++ 4 files changed, 137 insertions(+) create mode 100644 tests/tests/Ticket61.hs create mode 100644 tests/tests/Ticket61.html.ref create mode 100644 tests/tests/Ticket61_Hidden.hs (limited to 'tests') diff --git a/tests/tests/Hidden.hs b/tests/tests/Hidden.hs index e46fc37f..896da648 100644 --- a/tests/tests/Hidden.hs +++ b/tests/tests/Hidden.hs @@ -1,4 +1,6 @@ {-# OPTIONS_HADDOCK hide #-} + module Hidden where + hidden :: Int -> Int hidden a = a diff --git a/tests/tests/Ticket61.hs b/tests/tests/Ticket61.hs new file mode 100644 index 00000000..26ca287f --- /dev/null +++ b/tests/tests/Ticket61.hs @@ -0,0 +1,3 @@ +module Ticket61 (module Ticket61_Hidden) where + +import Ticket61_Hidden diff --git a/tests/tests/Ticket61.html.ref b/tests/tests/Ticket61.html.ref new file mode 100644 index 00000000..0e0c6c0a --- /dev/null +++ b/tests/tests/Ticket61.html.ref @@ -0,0 +1,125 @@ + + +Ticket61
 ContentsIndex
Ticket61
Documentation
class C a where
Methods
f :: a
A comment about f +
Produced by Haddock version 2.3.0
diff --git a/tests/tests/Ticket61_Hidden.hs b/tests/tests/Ticket61_Hidden.hs new file mode 100644 index 00000000..583c10cd --- /dev/null +++ b/tests/tests/Ticket61_Hidden.hs @@ -0,0 +1,7 @@ +{-# OPTIONS_HADDOCK hide #-} + +module Ticket61_Hidden where + +class C a where + -- | A comment about f + f :: a -- cgit v1.2.3