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) #

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 #

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 #

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

Constructors

ComponentInfo |

Fields

- compIsVisible :: IsVisible
- compIsBuildable :: IsBuildable

#### Instances

Instances details

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

newtype IsVisible #

Whether a component is visible in the current environment.

Constructors

IsVisible Bool |

#### Instances

Instances details

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

newtype IsBuildable #

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

Constructors

IsBuildable Bool |

#### Instances

Instances details

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

defaultQualifyOptions :: Index -> QualifyOptions #

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