From 105f31e1b5b1428ae27590893740017327d322ff Mon Sep 17 00:00:00 2001 From: Paolo Capriotti Date: Fri, 22 Jun 2012 18:26:47 +0100 Subject: Use right docMap to get decl documentation. --- src/Haddock/Interface/Create.hs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src') 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 -- cgit v1.2.3