diff options
author | David Waern <davve@dtek.chalmers.se> | 2008-01-06 14:40:52 +0000 |
---|---|---|
committer | David Waern <davve@dtek.chalmers.se> | 2008-01-06 14:40:52 +0000 |
commit | 671ec1ad8aec260511887788338f186055ac52d1 (patch) | |
tree | 06a96219aa35f2e24be6837b822968b75c4aead2 /src/Haddock/Interface | |
parent | 64512e4a070a69359bc26d43670cec6abc672caa (diff) |
Manual merge of a patch to the 0.8 branch
Thu Dec 6 15:00:10 CET 2007 Simon Marlow <simonmar@microsoft.com>
* Source links must point to the original module, not the referring
module
Diffstat (limited to 'src/Haddock/Interface')
-rw-r--r-- | src/Haddock/Interface/Create.hs | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/src/Haddock/Interface/Create.hs b/src/Haddock/Interface/Create.hs index fba25fe2..d2e616cc 100644 --- a/src/Haddock/Interface/Create.hs +++ b/src/Haddock/Interface/Create.hs @@ -53,17 +53,19 @@ createInterface ghcMod flags modMap = do | Flag_IgnoreAllExports `elem` flags = OptIgnoreExports : opts0 | otherwise = opts0 - let group = ghcGroup ghcMod - entities = (nubBy sameName . getTopEntities) group - exports = fmap (reverse . map unLoc) (ghcMbExports ghcMod) - entityNames_ = entityNames entities - subNames = allSubNames group - localNames = entityNames_ ++ subNames - subMap = mkSubMap group - expDeclMap = mkDeclMap (ghcExportedNames ghcMod) group - localDeclMap = mkDeclMap entityNames_ group - docMap = mkDocMap group - ignoreExps = Flag_IgnoreAllExports `elem` flags + let group = ghcGroup ghcMod + entities = (nubBy sameName . getTopEntities) group + exports = fmap (reverse . map unLoc) (ghcMbExports ghcMod) + entityNames_ = entityNames entities + subNames = allSubNames group + localNames = entityNames_ ++ subNames + subMap = mkSubMap group + expDeclMap = mkDeclMap (ghcExportedNames ghcMod) group + localDeclMap = mkDeclMap entityNames_ group + docMap = mkDocMap group + ignoreExps = Flag_IgnoreAllExports `elem` flags + exportedNames = ghcExportedNames ghcMod + origEnv = Map.fromList [ (nameOccName n, n) | n <- exportedNames ] visibleNames <- mkVisibleNames mod modMap localNames (ghcNamesInScope ghcMod) @@ -92,8 +94,9 @@ createInterface ghcMod flags modMap = do ifaceRnDocMap = Map.empty, ifaceSubMap = subMap, ifaceExportItems = prunedExportItems, - ifaceRnExportItems = [], - ifaceExports = ghcExportedNames ghcMod, + ifaceRnExportItems = [], + ifaceEnv = origEnv, + ifaceExports = exportedNames, ifaceVisibleExports = visibleNames, ifaceExportedDeclMap = expDeclMap, ifaceInstances = ghcInstances ghcMod |