Distribution.Solver.Modular.IndexConversion

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

Safe Haskell | None
Language | Haskell2010

Distribution.Solver.Modular.IndexConversion

Synopsis

- convPIs :: OS -> Arch -> CompilerInfo -> Map PN [LabeledPackageConstraint] -> ShadowPkgs -> StrongFlags -> SolveExecutables -> InstalledPackageIndex -> PackageIndex (SourcePackage loc) -> Index

# Documentation

convPIs :: OS -> Arch -> CompilerInfo -> Map PN [LabeledPackageConstraint] -> ShadowPkgs -> StrongFlags -> SolveExecutables -> InstalledPackageIndex -> PackageIndex (SourcePackage loc) -> Index #

Convert both the installed package index and the source package index into one uniform solver index.

We use `allPackagesBySourcePackageId` for the installed package index because that returns us several instances of the same package and version in order of preference. This allows us in principle to "shadow" packages if there are several installed packages of the same version. There are currently some shortcomings in both GHC and Cabal in resolving these situations. However, the right thing to do is to fix the problem there, so for now, shadowing is only activated if explicitly requested.