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

GHC 9.14.1 · lts/ghc-9.14.x · b2f3bfd · 2026-10-11

Moduleghc-9.14.1GHC2021

GHC.Unit.Module.Deps

Dependencies and Usage of a module

  • 6 types
  • 14 values
  • Packageghc-9.14.1
  • Exports21
  • LanguageGHC2021
  • LicenceBSD-3-Clause
  • SourceDeps.hs
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-9.14.1 · GHC.Unit.Module.Deps
  • NFData UsageDefined in ghc-9.14.1 · GHC.Unit.Module.Deps
  • Binary UsageDefined in ghc-9.14.1 · 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