ghc-9.2.0.20210821: The GHC API
Safe HaskellSafe-Inferred
LanguageHaskell2010

GHC.Unit.Module.Deps

Description

Dependencies and Usage of a module

Synopsis

Documentation

data Dependencies Source #

Dependency information about ALL modules and packages below this one in the import hierarchy.

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

Invariant: none of the lists contain duplicates.

Constructors

Deps 

Fields

  • dep_mods :: [ModuleNameWithIsBoot]

    All home-package modules transitively below this one I.e. modules that this one imports, or that are in the dep_mods of those directly-imported modules

  • dep_pkgs :: [(UnitId, Bool)]

    All packages transitively below this module I.e. packages to which this module's direct imports belong, or that are in the dep_pkgs of those modules The bool indicates if the package is required to be trusted when the module is imported as a safe import (Safe Haskell). See Note [Tracking Trust Transitively] in GHC.Rename.Names

  • dep_orphs :: [Module]

    Transitive closure of orphan modules (whether home or external pkg).

    (Possible optimization: don't include family instance orphans as they are anyway included in dep_finsts. But then be careful about code which relies on dep_orphs having the complete list!) This does NOT include us, unlike imp_orphs.

  • dep_finsts :: [Module]

    Transitive closure of depended upon modules which contain family instances (whether home or external). This is used by checkFamInstConsistency. This does NOT include us, unlike imp_finsts. See Note [The type family instance consistency story].

  • dep_plgins :: [ModuleName]

    All the plugins used while compiling this module.

Instances

Instances details
Binary Dependencies Source # 
Instance details

Defined in GHC.Unit.Module.Deps

Eq Dependencies Source # 
Instance details

Defined in GHC.Unit.Module.Deps

data Usage Source #

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

UsagePackageModule

Module from another package

Fields

UsageHomeModule

Module from the current package

Fields

UsageFile 

Fields

UsageMergedRequirement

A requirement which was merged into this one.

Fields

Instances

Instances details
Binary Usage Source # 
Instance details

Defined in GHC.Unit.Module.Deps

Eq Usage Source # 
Instance details

Defined in GHC.Unit.Module.Deps

Methods

(==) :: Usage -> Usage -> Bool #

(/=) :: Usage -> Usage -> Bool #