diff options
author | David Waern <david.waern@gmail.com> | 2008-10-16 20:58:42 +0000 |
---|---|---|
committer | David Waern <david.waern@gmail.com> | 2008-10-16 20:58:42 +0000 |
commit | 6319cccbd95ba15db6f34101577034233cdc8f88 (patch) | |
tree | fd67a34a0d8543d73359203bee48832690fcb3f8 /src/Haddock/Types.hs | |
parent | 9a0be441073e25b03aa5fd96d76e15454c8cc76f (diff) |
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.
Diffstat (limited to 'src/Haddock/Types.hs')
-rw-r--r-- | src/Haddock/Types.hs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Haddock/Types.hs b/src/Haddock/Types.hs index 671637c5..24f5fd25 100644 --- a/src/Haddock/Types.hs +++ b/src/Haddock/Types.hs @@ -47,6 +47,9 @@ data ExportItem name -- | Maybe a doc comment expItemMbDoc :: Maybe (HsDoc name), + -- | Documentation for subordinate declarations + expItemSubDocs :: [(name, HsDoc name)], + -- | Instances relevant to this declaration expItemInstances :: [InstHead name] |