Information about the currently loaded external packages. This is mutable because packages will be demand-loaded during a compilation run as required.
Moduleghc-9.10.3GHC2021
GHC.Unit.External
- 9 types
- 5 values
- Packageghc-9.10.3
- Exports14
- LanguageGHC2021
- LicenceBSD-3-Clause
- SourceExternal.hs
Information about other packages that we have slurped in by reading their interface files
Constructors
EPSeps_is_boot :: !InstalledModuleEnv ModuleNameWithIsBootIn OneShot mode (only), home-package modules accumulate in the external package state, and are sucked in lazily. For these home-pkg modules (only) we need to record which are boot modules. We set this field after loading all the explicitly-imported interfaces, but before doing anything else
The ModuleName part is not necessary, but it's useful for debug prints, and it's convenient because this field comes direct from
GHC.Tc.Utils.imp_dep_modseps_PIT :: !PackageIfaceTableThe ModIfaces for modules in external packages whose interfaces we have opened. The declarations in these interface files are held in the
eps_decls, eps_inst_env, eps_fam_inst_env andeps_rulesfields of this record, not in the mi_decls fields of the interface we have sucked in.What is in the PIT is:
The Module
Fingerprint info
Its exports
Fixities
Deprecations and warnings
eps_free_holes :: InstalledModuleEnv (UniqDSet ModuleName)Cache for mi_free_holes. Ordinarily, we can rely on the eps_PIT for this information, EXCEPT that when we do dependency analysis, we need to look at the
Dependenciesof our imports to determine what their precise free holes are (moduleFreeHolesPrecise). We don't want to repeatedly reread in the interface for every import, so cache it here. When the PIT gets filled in we can drop these entries.eps_PTE :: !PackageTypeEnvResult of typechecking all the external package interface files we have sucked in. The domain of the mapping is external-package modules
eps_inst_env :: !PackageInstEnvThe total InstEnv accumulated from all the external-package modules
eps_fam_inst_env :: !PackageFamInstEnvThe total FamInstEnv accumulated from all the external-package modules
eps_rule_base :: !PackageRuleBaseThe total
RuleEnvaccumulated from all the external-package moduleseps_ann_env :: !PackageAnnEnvThe total AnnEnv accumulated from all the external-package modules
eps_complete_matches :: !PackageCompleteMatchesThe total CompleteMatches accumulated from all the external-package modules
eps_mod_fam_inst_env :: !ModuleEnv FamInstEnvThe family instances accumulated from external packages, keyed off the module that declared them
eps_stats :: !EpsStatsStatistics about what was loaded from external packages
Accumulated statistics about what we are putting into the ExternalPackageState. "In" means stuff that is just read from interface files, "Out" means actually sucked in and type-checked
Constructors
EpsStatsn_ifaces_in :: !Intn_decls_in :: !Intn_decls_out :: !Intn_rules_in :: !Intn_rules_out :: !Intn_insts_in :: !Intn_insts_out :: !Int
Add stats for one newly-read interface
Helps us find information about modules in the imported packages
Constructs an empty PackageIfaceTable