\begin{code}
module RnNames (
rnImports, importsFromLocalDecls,
+ rnExports,
getLocalDeclBinders, extendRdrEnvRn,
reportUnusedNames, reportDeprecations,
- mkModDeps, exportsFromAvail
+ mkModDeps
) where
#include "HsVersions.h"
\begin{code}
type ExportAccum -- The type of the accumulating parameter of
- -- the main worker function in exportsFromAvail
+ -- the main worker function in rnExports
= ([Module], -- 'module M's seen so far
ExportOccMap, -- Tracks exported occurrence names
NameSet) -- The accumulated exported stuff
-- that have the same occurrence name
-exportsFromAvail :: Bool -- False => no 'module M(..) where' header at all
- -> Maybe [Located (IE RdrName)] -- Nothing => no explicit export list
- -> RnM NameSet
+rnExports :: Bool -- False => no 'module M(..) where' header at all
+ -> Maybe [Located (IE RdrName)] -- Nothing => no explicit export list
+ -> RnM NameSet
-- Complains if two distinct exports have same OccName
-- Warns about identical exports.
-- Complains about exports items not in scope
-exportsFromAvail explicit_mod exports
+rnExports explicit_mod exports
= do { TcGblEnv { tcg_rdr_env = rdr_env,
tcg_imports = imports } <- getGblEnv ;
| explicit_mod = exports
| ghci_mode == Interactive = Nothing
| otherwise = Just [noLoc (IEVar main_RDR_Unqual)] } ;
+ -- ToDo: the 'noLoc' here is unhelpful if 'main' turns out to be out of scope
exports_from_avail real_exports rdr_env imports }