Distribution.Backpack.LinkedComponent

Cabal-2.2.0.1: A framework for packaging Haskell software

Safe Haskell | None
Language | Haskell2010

Distribution.Backpack.LinkedComponent

Description

See https://github.com/ezyang/ghc-proposals/blob/backpack/proposals/0000-backpack.rst

Synopsis

- data LinkedComponent = LinkedComponent {
  - lc_ann_id :: AnnotatedId ComponentId
  - lc_component :: Component
  - lc_exe_deps :: [AnnotatedId OpenUnitId]
  - lc_public :: Bool
  - lc_includes :: [ComponentInclude OpenUnitId ModuleRenaming]
  - lc_sig_includes :: [ComponentInclude OpenUnitId ModuleRenaming]
  - lc_shape :: ModuleShape
  }
- lc_insts :: LinkedComponent -> [(ModuleName, OpenModule)]
- lc_uid :: LinkedComponent -> OpenUnitId
- lc_cid :: LinkedComponent -> ComponentId
- lc_pkgid :: LinkedComponent -> PackageId
- toLinkedComponent :: Verbosity -> FullDb -> PackageId -> LinkedComponentMap -> ConfiguredComponent -> LogProgress LinkedComponent
- toLinkedComponents :: Verbosity -> FullDb -> PackageId -> LinkedComponentMap -> [ConfiguredComponent] -> LogProgress [LinkedComponent]
- dispLinkedComponent :: LinkedComponent -> Doc
- type LinkedComponentMap = Map ComponentId (OpenUnitId, ModuleShape)
- extendLinkedComponentMap :: LinkedComponent -> LinkedComponentMap -> LinkedComponentMap

# Documentation

data LinkedComponent Source #

A linked component is a component that has been mix-in linked, at which point we have determined how all the dependencies of the component are explicitly instantiated (in the form of an OpenUnitId). `ConfiguredComponent` is mix-in linked into `LinkedComponent`, which is then instantiated into `ReadyComponent`.

Constructors

LinkedComponent |
Fields lc_ann_id :: AnnotatedId ComponentId Uniquely identifies linked component lc_component :: Component Corresponds to `cc_component`. lc_exe_deps :: [AnnotatedId OpenUnitId] `build-tools` and `build-tool-depends` dependencies. Corresponds to `cc_exe_deps`. lc_public :: Bool Is this the public library of a package? Corresponds to `cc_public`. lc_includes :: [ComponentInclude OpenUnitId ModuleRenaming] Corresponds to `cc_includes`, but (1) this does not contain includes of signature packages (packages with no exports), and (2) the `ModuleRenaming` for requirements (stored in `IncludeRenaming`) has been removed, as it is reflected in `OpenUnitId`.) lc_sig_includes :: [ComponentInclude OpenUnitId ModuleRenaming] Like `lc_includes`, but this specifies includes on signature packages which have no exports. lc_shape :: ModuleShape The module shape computed by mix-in linking. This is newly computed from `ConfiguredComponent`

Instances

Package LinkedComponent Source # |
Instance details Defined in Distribution.Backpack.LinkedComponent Methods packageId :: LinkedComponent -> PackageIdentifier Source #

lc_insts :: LinkedComponent -> [(ModuleName, OpenModule)] Source #

The instantiation of `lc_uid`; this always has the invariant that it is a mapping from a module name `A` to `A` (the hole A).

lc_uid :: LinkedComponent -> OpenUnitId Source #

The `OpenUnitId` of this component in the "default" instantiation. See also `lc_insts`. `LinkedComponent`s cannot be instantiated (e.g., there is no `ModSubst` instance for them).

lc_cid :: LinkedComponent -> ComponentId Source #

Uniquely identifies a `LinkedComponent`. Corresponds to `cc_cid`.

lc_pkgid :: LinkedComponent -> PackageId Source #

Corresponds to `cc_pkgid`.

toLinkedComponent :: Verbosity -> FullDb -> PackageId -> LinkedComponentMap -> ConfiguredComponent -> LogProgress LinkedComponent Source #

toLinkedComponents :: Verbosity -> FullDb -> PackageId -> LinkedComponentMap -> [ConfiguredComponent] -> LogProgress [LinkedComponent] Source #

dispLinkedComponent :: LinkedComponent -> Doc Source #

type LinkedComponentMap = Map ComponentId (OpenUnitId, ModuleShape) Source #

extendLinkedComponentMap :: LinkedComponent -> LinkedComponentMap -> LinkedComponentMap Source #