aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsimonmar <unknown>2004-03-22 14:09:03 +0000
committersimonmar <unknown>2004-03-22 14:09:03 +0000
commit19b6bb9916325f14cfef3725dcfa8bf750339cb6 (patch)
tree5c3cca8181907a57e6e5b995915e4706e93e6d82 /src
parent6f26d21ab98e25f19ae46f9cfea9536505e91334 (diff)
[haddock @ 2004-03-22 14:09:03 by simonmar]
getReExports was bogus: we should really look in the import_env to find the documentation for an entity which we are re-exporting without documentation. Suggested by: Ross Paterson (patch modified by me).
Diffstat (limited to 'src')
-rw-r--r--src/Main.hs24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/Main.hs b/src/Main.hs
index c4d03535..a6ae0a24 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -403,7 +403,8 @@ mkInterface no_implicit_prelude verbose mod_map filename package
-- find the names exported by this module that other modules should *not*
-- link to (and point them to where they should).
- reexports = getReExports mdl mod_map exported_names exported_visible_names
+ reexports = getReExports mdl exported_names exported_visible_names
+ import_env
import_env = local_import_env `plusFM`
buildImportEnv mod_map mdl exported_visible_names
@@ -824,24 +825,23 @@ all_subs_of_qname _ n@(UnQual _) =
-- documentation for those names can be found. This is used for
-- constructing the iface_reexports field of the Interface.
-getReExports :: Module -> ModuleMap
+getReExports :: Module
-> [HsQName] -- all exported names
-> [HsQName] -- exported names which are documented here
+ -> FiniteMap HsQName HsQName
-> FiniteMap HsName HsQName
-getReExports mdl mod_map exported exported_visible
- = listToFM (concat (map get_name invisible_names))
+getReExports mdl exported exported_visible import_env
+ = listToFM (concat invisible_names)
where
- invisible_names = [ n | n <- exported, n `notElem` exported_visible ]
+ invisible_names = [ get_name n | n <- exported,
+ n `notElem` exported_visible ]
get_name (UnQual _) = []
- get_name (Qual m n) =
- case lookupFM mod_map m of
+ get_name n@(Qual m un) =
+ case lookupFM import_env n of
Nothing -> []
- Just iface ->
- case lookupFM (iface_reexported iface) n of
- Just somewhere_else -> [(n, somewhere_else)]
- Nothing -> [(n, Qual m n)]
-
+ Just n' -> [(un,n')]
+
-- ----------------------------------------------------------------------------
-- Building name environments