_ -> False
imports = ImportAvails {
- imp_mods = unitModuleEnv imp_mod (imp_mod, [(qual_mod_name, import_all, loc)]),
+ imp_mods = unitModuleEnv imp_mod [(qual_mod_name, import_all, loc)],
imp_orphs = orphans,
imp_finsts = finsts,
imp_dep_mods = mkModDeps dependent_mods,
kids_env = mkChildEnv (globalRdrEnvElts rdr_env)
imported_modules = [ qual_name
- | (_, xs) <- moduleEnvElts $ imp_mods imports,
+ | xs <- moduleEnvElts $ imp_mods imports,
(qual_name, _, _) <- xs ]
exports_from_item :: ExportAccum -> LIE RdrName -> RnM ExportAccum
-- They just clutter up the environment (esp tuples), and the parser
-- will generate Exact RdrNames for them, so the cluttered
-- envt is no use. To avoid doing this filter all the time,
- -- we use -fno-implicit-prelude as a clue that the filter is
+ -- we use -XNoImplicitPrelude as a clue that the filter is
-- worth while. Really, it's only useful for GHC.Base and GHC.Tuple.
--
-- It's worth doing because it makes the environment smaller for
its interface (although we could).
b) It might be GHC.Real.fromRational, or GHC.Num.fromInteger
- These are seen as "used" by the renamer (if -fno-implicit-prelude)
+ These are seen as "used" by the renamer (if -XNoImplicitPrelude)
is on), but the typechecker may discard their uses
if in fact the in-scope fromRational is GHC.Read.fromRational,
(see tcPat.tcOverloadedLit), and the typechecker sees that the type
direct_import_mods :: [(Module, [(ModuleName, Bool, SrcSpan)])]
-- See the type of the imp_mods for this triple
- direct_import_mods = moduleEnvElts (imp_mods imports)
+ direct_import_mods = fmToList (imp_mods imports)
-- unused_imp_mods are the directly-imported modules
-- that are not mentioned in minimal_imports1