Cabal-3.10.1.0: A framework for packaging Haskell software

Safe Haskell | Safe-Inferred
Language | Haskell2010

Distribution.Backpack.ConfiguredComponent

Description

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

Synopsis

- data ConfiguredComponent = ConfiguredComponent {
  - cc_ann_id :: AnnotatedId ComponentId
  - cc_component :: Component
  - cc_public :: Bool
  - cc_exe_deps :: [AnnotatedId ComponentId]
  - cc_includes :: [ComponentInclude ComponentId IncludeRenaming]
  }
- cc_name :: ConfiguredComponent -> ComponentName
- cc_cid :: ConfiguredComponent -> ComponentId
- cc_pkgid :: ConfiguredComponent -> PackageId
- toConfiguredComponent :: PackageDescription -> ComponentId -> ConfiguredComponentMap -> ConfiguredComponentMap -> Component -> LogProgress ConfiguredComponent
- toConfiguredComponents :: Bool -> FlagAssignment -> Bool -> Flag String -> Flag ComponentId -> PackageDescription -> ConfiguredComponentMap -> [Component] -> LogProgress [ConfiguredComponent]
- dispConfiguredComponent :: ConfiguredComponent -> Doc
- type ConfiguredComponentMap = Map PackageName (Map ComponentName (AnnotatedId 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_ann_id :: AnnotatedId ComponentId

  Unique identifier of component, plus extra useful info.

- 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_exe_deps :: [AnnotatedId ComponentId]

  Dependencies on executables from `build-tools` and `build-tool-depends`.

- 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.

cc_cid :: ConfiguredComponent -> ComponentId Source #

Uniquely identifies a configured component.

cc_pkgid :: ConfiguredComponent -> PackageId Source #

The package this component came from.

toConfiguredComponent :: PackageDescription -> ComponentId -> ConfiguredComponentMap -> ConfiguredComponentMap -> Component -> LogProgress ConfiguredComponent Source #

toConfiguredComponents :: Bool -> FlagAssignment -> Bool -> Flag String -> Flag ComponentId -> PackageDescription -> ConfiguredComponentMap -> [Component] -> LogProgress [ConfiguredComponent] Source #

dispConfiguredComponent :: ConfiguredComponent -> Doc Source #

Pretty-print a `ConfiguredComponent`.

type ConfiguredComponentMap = Map PackageName (Map ComponentName (AnnotatedId ComponentId)) Source #

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

newPackageDepsBehaviour :: PackageDescription -> Bool Source #