aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Interface/Rename.hs
diff options
context:
space:
mode:
authorDavid Waern <david.waern@gmail.com>2008-10-15 22:15:01 +0000
committerDavid Waern <david.waern@gmail.com>2008-10-15 22:15:01 +0000
commit6e68962ae8a03bfa60ae2c1db6051cab2f30613b (patch)
tree4133ff4b348bc1fd124d4816077290ff3c761fd8 /src/Haddock/Interface/Rename.hs
parent08e2aa223e55207c46df655976e46ed7aac60805 (diff)
Add subordinates with docs to the declaration map
The only place in the code where we want the subordinates for a declaration is right after having looked up the declaration in the map. And since we include subordinates in the map, we might as well take the opportunity to store those subordinates that belong to a particular declaration together with that declaration. We also store the documentation for each subordinate.
Diffstat (limited to 'src/Haddock/Interface/Rename.hs')
-rw-r--r--src/Haddock/Interface/Rename.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Haddock/Interface/Rename.hs b/src/Haddock/Interface/Rename.hs
index 39aeb48a..3efc2526 100644
--- a/src/Haddock/Interface/Rename.hs
+++ b/src/Haddock/Interface/Rename.hs
@@ -38,7 +38,7 @@ renameInterface renamingEnv warnings mod =
let localEnv = foldl fn renamingEnv (ifaceVisibleExports mod)
where fn env name = Map.insert name (ifaceMod mod) env
- docMap = Map.map snd $ ifaceDeclMap mod
+ docMap = Map.map (\(_,x,_) -> x) (ifaceDeclMap mod)
docs = [ (n, doc) | (n, Just doc) <- Map.toList docMap ]
renameMapElem (k,d) = do d' <- renameDoc d; return (k, d')