aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Interface/Create.hs
diff options
context:
space:
mode:
authorDavid Waern <david.waern@gmail.com>2012-04-01 02:16:15 +0200
committerDavid Waern <david.waern@gmail.com>2012-04-01 02:16:15 +0200
commit563302747deca1c66dff8ddf260e23153d310c73 (patch)
tree7555206f349453b294f7312c22cd911a0df78d27 /src/Haddock/Interface/Create.hs
parent3f6a3f1983a9414e650a6dff0c7b0e824c8d83fe (diff)
Don't filter out unexported names from the four maps - fixes a regression.
Diffstat (limited to 'src/Haddock/Interface/Create.hs')
-rw-r--r--src/Haddock/Interface/Create.hs9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/Haddock/Interface/Create.hs b/src/Haddock/Interface/Create.hs
index 5ba763cb..94575209 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]: