Distribution.Backpack.ConfiguredComponent

Cabal-2.0.0.0: A framework for packaging Haskell software

Safe Haskell | None
Language | Haskell2010

Distribution.Backpack.ConfiguredComponent (signature[?])

Description

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

Synopsis

- data ConfiguredComponent = ConfiguredComponent {
  - cc_cid :: ComponentId
  - cc_pkgid :: PackageId
  - cc_component :: Component
  - cc_public :: Bool
  - cc_internal_build_tools :: [ComponentId]
  - cc_includes :: [ComponentInclude ComponentId IncludeRenaming]
  }
- cc_name :: ConfiguredComponent -> ComponentName
- toConfiguredComponent :: PackageDescription -> ComponentId -> Map PackageName (ComponentId, PackageId) -> ConfiguredComponentMap -> Component -> ConfiguredComponent
- toConfiguredComponents :: Bool -> FlagAssignment -> Bool -> Flag String -> Flag ComponentId -> PackageDescription -> Map PackageName (ComponentId, PackageId) -> [Component] -> [ConfiguredComponent]
- dispConfiguredComponent :: ConfiguredComponent -> Doc
- type ConfiguredComponentMap = (Map PackageName (ComponentId, PackageId), Map UnqualComponentName ComponentId)
- extendConfiguredComponentMap :: ConfiguredComponent -> ConfiguredComponentMap -> ConfiguredComponentMap
- newPackageDepsBehaviour :: PackageDescription -> Bool

# Documentation

data ConfiguredComponent Source #

A configured component, we know exactly what its `ComponentId` is, and the `ComponentId`s of the things it depends on.

Constructors

ConfiguredComponent |
Fields cc_cid :: ComponentId Uniquely identifies a configured component. cc_pkgid :: PackageId The package this component came from. cc_component :: Component The fragment of syntax from the Cabal file describing this component. cc_public :: Bool Is this the public library component of the package? (If we invoke Setup with an instantiation, this is the component the instantiation applies to.) Note that in one-component configure mode, this is always True, because any component is the "public" one.) cc_internal_build_tools :: [ComponentId] Dependencies on internal executables from `build-tools`. cc_includes :: [ComponentInclude ComponentId IncludeRenaming] The mixins of this package, including both explicit (from the `mixins` field) and implicit (from `build-depends`). Not mix-in linked yet; component configuration only looks at `ComponentId`s.

cc_name :: ConfiguredComponent -> ComponentName Source #

The `ComponentName` of a component; this uniquely identifies a fragment of syntax within a specified Cabal file describing the component.

toConfiguredComponent :: PackageDescription -> ComponentId -> Map PackageName (ComponentId, PackageId) -> ConfiguredComponentMap -> Component -> ConfiguredComponent Source #

Given some ambient environment of package names that are "in scope", looks at the `BuildInfo` to decide what the packages actually resolve to, and then builds a `ConfiguredComponent`.

toConfiguredComponents :: Bool -> FlagAssignment -> Bool -> Flag String -> Flag ComponentId -> PackageDescription -> Map PackageName (ComponentId, PackageId) -> [Component] -> [ConfiguredComponent] Source #

dispConfiguredComponent :: ConfiguredComponent -> Doc Source #

Pretty-print a `ConfiguredComponent`.

type ConfiguredComponentMap = (Map PackageName (ComponentId, PackageId), Map UnqualComponentName ComponentId) Source #

extendConfiguredComponentMap :: ConfiguredComponent -> ConfiguredComponentMap -> ConfiguredComponentMap Source #

newPackageDepsBehaviour :: PackageDescription -> Bool Source #