aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Interface
diff options
context:
space:
mode:
authorDavid Waern <david.waern@gmail.com>2008-07-12 16:55:21 +0000
committerDavid Waern <david.waern@gmail.com>2008-07-12 16:55:21 +0000
commitfdd8e13d1462e63556a90bdaecf694bc7ba4c10c (patch)
tree69818916e3e09869a81964c080b5a08adbf38c54 /src/Haddock/Interface
parent32868490786d0328c59097915d5c56d3220d2a86 (diff)
Get the all locally defined names from GHC API
We previously had some code to compute all locally defined names in a module including subordinate names. We don't need it since we can get the names from modInfoTyThings in the GHC API.
Diffstat (limited to 'src/Haddock/Interface')
-rw-r--r--src/Haddock/Interface/Create.hs9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/Haddock/Interface/Create.hs b/src/Haddock/Interface/Create.hs
index 60d657c0..b5ebe255 100644
--- a/src/Haddock/Interface/Create.hs
+++ b/src/Haddock/Interface/Create.hs
@@ -57,10 +57,8 @@ createInterface ghcMod flags modMap = do
entities = (nubBy sameName . getTopEntities) group
exports = fmap (reverse . map unLoc) (ghcMbExports ghcMod)
entityNames_ = entityNames entities
- subNames = allSubNames group
- localNames = entityNames_ ++ subNames
+ localNames = ghcDefinedNames ghcMod
subMap = mkSubMap group
--- declMap = mkDeclMap entityNames_ group
declMap = mkDeclMap localNames group
docMap = mkDocMap group
ignoreExps = Flag_IgnoreAllExports `elem` flags
@@ -255,11 +253,6 @@ mkDocMap group = Map.fromList (topDeclDocs ++ classMethDocs ++ recordFieldDocs)
ConDeclField lname _ (Just (L _ doc)) <- fields ]
-allSubNames :: HsGroup Name -> [Name]
-allSubNames group =
- concat [ tail (map unLoc (tyClDeclNames tycld)) | L _ tycld <- hs_tyclds group ]
-
-
mkSubMap :: HsGroup Name -> Map Name [Name]
mkSubMap group = Map.fromList [ (name, subs) | L _ tycld <- hs_tyclds group,
let name:subs = map unLoc (tyClDeclNames tycld) ]