diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Main.hs | 24 | 
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  | 
