aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaolo Capriotti <p.capriotti@gmail.com>2012-06-22 18:26:47 +0100
committerPaolo Capriotti <p.capriotti@gmail.com>2012-06-22 18:26:47 +0100
commit105f31e1b5b1428ae27590893740017327d322ff (patch)
tree299362e66233310f5e8438bac6e6a078cb537fb0 /src
parent1125b88a1001de27c243a47ceb8b22564cc22290 (diff)
Use right docMap to get decl documentation.
Diffstat (limited to 'src')
-rw-r--r--src/Haddock/Interface/Create.hs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Haddock/Interface/Create.hs b/src/Haddock/Interface/Create.hs
index 6c35a12c..c3d5d291 100644
--- a/src/Haddock/Interface/Create.hs
+++ b/src/Haddock/Interface/Create.hs
@@ -433,7 +433,13 @@ mkExportItems
declWith :: Name -> ErrMsgGhc [ ExportItem Name ]
declWith t =
- let (doc, subs) = exportDecl t docMap argMap subMap in
+ let mdl = nameModule t
+ (doc, subs)
+ | mdl == thisMod =
+ exportDecl t docMap argMap subMap
+ | Just iface <- M.lookup mdl modMap =
+ exportDecl t (ifaceDocMap iface) (ifaceArgMap iface) (ifaceSubMap iface)
+ | otherwise = (noDocForDecl, []) in
case findDecl t of
[L _ (ValD _)] -> do
-- Top-level binding without type signature