Repository : ssh://darcs.haskell.org//srv/darcs/haddock

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/105f31e1b5b1428ae27590893740017327d322ff

>---------------------------------------------------------------

commit 105f31e1b5b1428ae27590893740017327d322ff
Author: Paolo Capriotti <[email protected]>
Date:   Fri Jun 22 18:26:47 2012 +0100

    Use right docMap to get decl documentation.

>---------------------------------------------------------------

 src/Haddock/Interface/Create.hs |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/src/Haddock/Interface/Create.hs b/src/Haddock/Interface/Create.hs
index 6c35a12..c3d5d29 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



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to