HORIZON HASKELLDocslts/ghc-10.0.x8174fa42026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8174fa4 · 2026-10-11

Moduleghc-10.0.0.20260917GHC2024

GHC.Unit.Module.Deps

Dependencies and Usage of a module

  • 7 types
  • 16 values
datadata Dependencies
#

Dependency information about ALL modules and packages below this one in the import hierarchy. This is the serialisable version of ImportAvails.

Invariant: the dependencies of a module M never includes M.

Invariant: none of the lists contain duplicates.

Invariant: lists are ordered canonically (e.g. using stableModuleCmp)

See Note [Transitive Information in Dependencies]

Instances3Eq, NFData, Binary
datadata Usage
#

Records modules for which changes may force recompilation of this module See wiki: https://gitlab.haskell.org/ghc/ghc/wikis/commentary/compiler/recompilation-avoidance

This differs from Dependencies. A module X may be in the dep_mods of this module (via an import chain) but if we don't use anything from X it won't appear in our Usage

Constructors

Instances3Eq, NFData, Binary
  • Eq UsageDefined in ghc-10.0.0.20260917 · GHC.Unit.Module.Deps
  • NFData UsageDefined in ghc-10.0.0.20260917 · GHC.Unit.Module.Deps
  • Binary UsageDefined in ghc-10.0.0.20260917 · GHC.Unit.Module.Deps
datadata HomeModImport
#

Records the imports that we depend on from a home module, for recompilation checking.

See Note [When to recompile when export lists change?] in GHC.Iface.Recomp.

Constructors

Instances4Eq, NFData, Outputable, Binary

Records all the Avails we are importing from a home module.

Constructors

Instances4Eq, NFData, Outputable, Binary
datadata ImportAvails
#

ImportAvails summarises what was imported from where, irrespective of whether the imported things are actually used or not. It is used:

  • when processing the export list,

  • when constructing usage info for the interface file,

  • to identify the list of directly imported modules for initialisation purposes and for optimised overlap checking of family instances,

  • when figuring out what things are really unused

Constructors

newtypenewtype IfaceImportLevel
#
Instances5Eq, Ord, NFData, Outputable, Binary