cabal-install-solver-3.12.1.0: The command-line interface for Cabal and Hackage.

Safe Haskell | None
Language | Haskell2010

Distribution.Solver.Modular.Index

Synopsis

- type Index = Map PN (Map I PInfo)
- data PInfo = PInfo (FlaggedDeps PN) (Map ExposedComponent ComponentInfo) FlagInfo (Maybe FailReason)
- data ComponentInfo = ComponentInfo {
  - compIsVisible :: IsVisible
  - compIsBuildable :: IsBuildable
  }
- newtype IsVisible = IsVisible Bool
- newtype IsBuildable = IsBuildable Bool
- defaultQualifyOptions :: Index -> QualifyOptions
- mkIndex :: [(PN, I, PInfo)] -> Index

# Documentation

type Index = Map PN (Map I PInfo) Source #

An index contains information about package instances. This is a nested dictionary. Package names are mapped to instances, which in turn is mapped to info.

data PInfo Source #

Info associated with a package instance. Currently, dependencies, component names, flags and failure reasons. The component map records whether any components are unbuildable in the current environment (compiler, os, arch, and global flag constraints). Packages that have a failure reason recorded for them are disabled globally, for reasons external to the solver. We currently use this for shadowing which essentially is a GHC limitation, and for installed packages that are broken.

Constructors

PInfo (FlaggedDeps PN) (Map ExposedComponent ComponentInfo) FlagInfo (Maybe FailReason) |

data ComponentInfo Source #

Info associated with each library and executable in a package instance.

Constructors

ComponentInfo |

Fields

- compIsVisible :: IsVisible
- compIsBuildable :: IsBuildable

#### Instances

Instances details

Show ComponentInfo Source # |
Instance details Defined in Distribution.Solver.Modular.Index Methods showsPrec :: Int -> ComponentInfo -> ShowS Source # show :: ComponentInfo -> String Source # showList :: [ComponentInfo] -> ShowS Source #

newtype IsVisible Source #

Whether a component is visible in the current environment.

Constructors

IsVisible Bool |

#### Instances

Instances details

Show IsVisible Source # |
Instance details Defined in Distribution.Solver.Modular.Index Methods showsPrec :: Int -> IsVisible -> ShowS Source # show :: IsVisible -> String Source # showList :: [IsVisible] -> ShowS Source #
Eq IsVisible Source # |
Instance details Defined in Distribution.Solver.Modular.Index Methods (==) :: IsVisible -> IsVisible -> Bool Source # (/=) :: IsVisible -> IsVisible -> Bool Source #

newtype IsBuildable Source #

Whether a component is made unbuildable by a "buildable: False" field.

Constructors

IsBuildable Bool |

#### Instances

Instances details

Show IsBuildable Source # |
Instance details Defined in Distribution.Solver.Modular.Index Methods showsPrec :: Int -> IsBuildable -> ShowS Source # show :: IsBuildable -> String Source # showList :: [IsBuildable] -> ShowS Source #
Eq IsBuildable Source # |
Instance details Defined in Distribution.Solver.Modular.Index Methods (==) :: IsBuildable -> IsBuildable -> Bool Source # (/=) :: IsBuildable -> IsBuildable -> Bool Source #

defaultQualifyOptions :: Index -> QualifyOptions Source #

mkIndex :: [(PN, I, PInfo)] -> Index Source #