#include "HsVersions.h"
import DriverState ( v_GhcMode, isCompManagerMode )
-import DriverUtil ( splitFilename, replaceFilenameSuffix )
+import DriverUtil ( replaceFilenameSuffix )
import CmdLineOpts ( opt_IgnoreIfacePragmas )
import Parser ( parseIface )
import HscTypes ( ModIface(..), emptyModIface,
- ExternalPackageState(..),
+ ExternalPackageState(..), noDependencies,
VersionInfo(..), Usage(..),
lookupIfaceByModName, RdrExportItem,
- WhetherHasOrphans, IsBootInterface,
+ IsBootInterface,
DeclsMap, GatedDecl, IfaceInsts, IfaceRules, mkIfaceDecls,
AvailInfo, GenAvailInfo(..), ParsedIface(..), IfaceDeprecs,
Avails, availNames, availName, Deprecations(..)
import Bag
import BinIface ( readBinIface )
import Panic
-import Config
import EXCEPTION as Exception
import DATA_IOREF ( readIORef )
-- before we got to real imports.
other ->
- traceRn (vcat [text "loadInterface" <+> brackets doc_str,
- ppr (dep_mods import_avails)]) `thenM_`
let
- mod_map = dep_mods import_avails
+ mod_map = imp_dep_mods import_avails
mod_info = lookupModuleEnvByName mod_map mod_name
hi_boot_file
= case (from, mod_info) of
- (ImportByUser is_boot, _) -> is_boot
- (ImportForUsage is_boot, _) -> is_boot
- (ImportBySystem, Just (_, _, is_boot)) -> is_boot
- (ImportBySystem, Nothing) -> False
+ (ImportByUser is_boot, _) -> is_boot
+ (ImportForUsage is_boot, _) -> is_boot
+ (ImportBySystem, Just (_, is_boot)) -> is_boot
+ (ImportBySystem, Nothing) -> False
-- We're importing a module we know absolutely
-- nothing about, so we assume it's from
-- another package, where we aren't doing
redundant_source_import
= case (from, mod_info) of
- (ImportByUser True, Just (_, _, False)) -> True
- other -> False
+ (ImportByUser True, Just (_, False)) -> True
+ other -> False
in
-- Issue a warning for a redundant {- SOURCE -} import
vers_rules = rule_vers,
vers_decls = decls_vers }
- this_mod_name = moduleName this_mod
- is_loaded m = m == this_mod_name
- || maybeToBool (lookupIfaceByModName hpt pit m)
- -- We treat the currently-being-compiled module as 'loaded' because
- -- even though it isn't yet in the HIT or PIT; otherwise it gets
- -- put into iImpModInfo, and then spat out into its own interface
- -- file as a dependency
-
-- Now add info about this module to the PIT
+ -- Even home modules loaded by this route (which only
+ -- happens in OneShot mode) are put in the PIT
has_orphans = pi_orphan iface
new_pit = extendModuleEnv pit mod mod_iface
mod_iface = ModIface { mi_module = mod, mi_package = pi_pkg iface,
new_version_map = extendNameEnv version_map main_name version
in
- traceRn (text "Loading" <+> ppr full_avail) `thenM_`
+-- traceRn (text "Loading" <+> ppr full_avail) `thenM_`
returnM (new_version_map, new_decls_map)
-- (Note that we do let the inst decl in if it mentions
-- no tycons at all. Hence the null free_ty_names.)
in
- traceRn ((text "Load instance for" <+> ppr inst_ty') $$ ppr free_tcs) `thenM_`
+-- traceRn ((text "Load instance for" <+> ppr inst_ty') $$ ppr free_tcs) `thenM_`
returnM ((gate_fn, (mod, decl)) `consBag` insts)
returnM (DeprecSome env)
loadDeprec deprec_env (n, txt)
= lookupGlobalOccRn n `thenM` \ name ->
- traceRn (text "Loaded deprecation(s) for" <+> ppr name <> colon <+> ppr txt) `thenM_`
+-- traceRn (text "Loaded deprecation(s) for" <+> ppr name <> colon <+> ppr txt) `thenM_`
returnM (extendNameEnv deprec_env name (name,txt))
\end{code}
ghcPrimIface = ParsedIface {
pi_mod = gHC_PRIM_Name,
pi_pkg = basePackage,
- pi_deps = ([],[]),
+ pi_deps = noDependencies,
pi_vers = 1,
pi_orphan = False,
pi_usages = [],