HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

  • Packageghc-9.10.3
  • Exports54
  • LanguageGHC2021
  • LicenceBSD-3-Clause
  • SourceEnv.hs

Unit Env helper functions

19 declarations

HomeUnitEnv

7 declarations
datadata HomeUnitEnv
#

Constructors

  • HomeUnitEnv
    • homeUnitEnv_units :: !UnitState

      External units

    • homeUnitEnv_unit_dbs :: !Maybe [UnitDatabase UnitId]

      Stack of unit databases for the target platform.

      This field is populated with the result of initUnits.

      Nothing means the databases have never been read from disk.

      Usually we don't reload the databases from disk if they are cached, even if the database flags changed!

    • homeUnitEnv_dflags :: DynFlags

      The dynamic flag settings

    • homeUnitEnv_hpt :: HomePackageTable

      The home package table describes already-compiled home-package modules, excluding the module we are compiling right now. (In one-shot mode the current module is the only home-package module, so homeUnitEnv_hpt is empty. All other modules count as "external-package" modules. However, even in GHCi mode, hi-boot interfaces are demand-loaded into the external-package table.)

      homeUnitEnv_hpt is not mutable because we only demand-load external packages; the home package is eagerly loaded, module by module, by the compilation manager.

      The HPT may contain modules compiled earlier by --make but not actually below the current module in the dependency graph.

      (This changes a previous invariant: changed Jan 05.)

    • homeUnitEnv_home_unit :: !Maybe HomeUnit

      Home-unit

Instances2Outputable

UnitEnvGraph

17 declarations

Invariants

1 declaration

Preload units info

2 declarations

Home Module functions

1 declaration