cabal-install-solver
Safe HaskellSafe-Inferred
LanguageHaskell2010

Distribution.Solver.Modular.IndexConversion

Synopsis

Documentation

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

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.