[commit: haddock] ghc-7.4: Don't filter out unexported names from the four maps - fixes a regression. (5633027)
David Waern
waern at galois.com
Sun Apr 1 01:54:21 CEST 2012
Repository : ssh://darcs.haskell.org//srv/darcs/haddock
On branch : ghc-7.4
http://hackage.haskell.org/trac/ghc/changeset/563302747deca1c66dff8ddf260e23153d310c73
>---------------------------------------------------------------
commit 563302747deca1c66dff8ddf260e23153d310c73
Author: David Waern <david.waern at gmail.com>
Date: Sun Apr 1 02:16:15 2012 +0200
Don't filter out unexported names from the four maps - fixes a regression.
>---------------------------------------------------------------
src/Haddock/Interface/Create.hs | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/Haddock/Interface/Create.hs b/src/Haddock/Interface/Create.hs
index 5ba763c..9457520 100644
--- a/src/Haddock/Interface/Create.hs
+++ b/src/Haddock/Interface/Create.hs
@@ -77,7 +77,7 @@ createInterface tm flags modMap instIfaceMap = do
localInsts = filter (nameIsLocalOrFrom mdl . getName) instances
(docMap0, argMap, subMap, declMap) <-
- liftErrMsg $ mkMaps dflags gre localInsts exportedNames declsWithDocs
+ liftErrMsg $ mkMaps dflags gre localInsts declsWithDocs
let docMap = addWarnings warnings gre exportedNames docMap0
maps = (docMap, argMap, subMap, declMap)
@@ -203,10 +203,9 @@ type Maps = (DocMap Name, ArgMap Name, SubMap, DeclMap)
mkMaps :: DynFlags
-> GlobalRdrEnv
-> [Instance]
- -> [Name]
-> [(LHsDecl Name, [HsDocString])]
-> ErrMsgM Maps
-mkMaps dflags gre instances exports decls = do
+mkMaps dflags gre instances decls = do
(a, b, c, d) <- unzip4 <$> mapM mappings decls
return (f a, f b, f c, f d)
where
@@ -220,7 +219,7 @@ mkMaps dflags gre instances exports decls = do
m' <- M.mapMaybe id <$> T.mapM (processDocStringParas dflags gre) m
return (doc, m')
(doc, args) <- declDoc docStrs (typeDocs decl)
- let subs = [ s | s@(n, _, _) <- subordinates decl, n `elem` exports ]
+ let subs = subordinates decl
(subDocs, subArgs) <- unzip <$> mapM (\(_, strs, m) -> declDoc strs m) subs
let ns = names decl
subNs = [ n | (n, _, _) <- subs ]
@@ -235,7 +234,7 @@ mkMaps dflags gre instances exports decls = do
names :: HsDecl Name -> [Name]
names (InstD (InstDecl (L l _) _ _ _)) = maybeToList (M.lookup l instanceMap) -- See note [2].
- names decl = filter (`elem` exports) (getMainDeclBinder decl)
+ names decl = getMainDeclBinder decl
-- Note [2]:
More information about the Cvs-ghc
mailing list