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

Safe Haskell | None
Language | Haskell2010

Distribution.Solver.Modular.Solver

Synopsis

- data SolverConfig = SolverConfig {
  - reorderGoals :: ReorderGoals
  - countConflicts :: CountConflicts
  - fineGrainedConflicts :: FineGrainedConflicts
  - minimizeConflictSet :: MinimizeConflictSet
  - independentGoals :: IndependentGoals
  - avoidReinstalls :: AvoidReinstalls
  - shadowPkgs :: ShadowPkgs
  - strongFlags :: StrongFlags
  - onlyConstrained :: OnlyConstrained
  - maxBackjumps :: Maybe Int
  - enableBackjumping :: EnableBackjumping
  - solveExecutables :: SolveExecutables
  - goalOrder :: Maybe (Variable QPN -> Variable QPN -> Ordering)
  - solverVerbosity :: Verbosity
  - pruneAfterFirstSuccess :: PruneAfterFirstSuccess
  }
- solve :: SolverConfig -> CompilerInfo -> Index -> PkgConfigDb -> (PN -> PackagePreferences) -> Map PN [LabeledPackageConstraint] -> Set PN -> RetryLog Message SolverFailure (Assignment, RevDepMap)
- newtype PruneAfterFirstSuccess = PruneAfterFirstSuccess Bool

# Documentation

data SolverConfig Source #

Various options for the modular solver.

Constructors

SolverConfig |

Fields

- reorderGoals :: ReorderGoals
- countConflicts :: CountConflicts
- fineGrainedConflicts :: FineGrainedConflicts
- minimizeConflictSet :: MinimizeConflictSet
- independentGoals :: IndependentGoals
- avoidReinstalls :: AvoidReinstalls
- shadowPkgs :: ShadowPkgs
- strongFlags :: StrongFlags
- onlyConstrained :: OnlyConstrained
- maxBackjumps :: Maybe Int
- enableBackjumping :: EnableBackjumping
- solveExecutables :: SolveExecutables
- goalOrder :: Maybe (Variable QPN -> Variable QPN -> Ordering)
- solverVerbosity :: Verbosity
- pruneAfterFirstSuccess :: PruneAfterFirstSuccess

solve Source #

Arguments

:: SolverConfig | solver parameters
-> CompilerInfo |
-> Index | all available packages as an index
-> PkgConfigDb | available pkg-config pkgs
-> (PN -> PackagePreferences) | preferences
-> Map PN [LabeledPackageConstraint] | global constraints
-> Set PN | global goals
-> RetryLog Message SolverFailure (Assignment, RevDepMap) |

Run all solver phases.

In principle, we have a valid tree after `validationPhase`, which means that every `Done` node should correspond to valid solution.

There is one exception, though, and that is cycle detection, which has been added relatively recently. Cycles are only removed directly before exploration.

newtype PruneAfterFirstSuccess Source #

Whether to remove all choices after the first successful choice at each level in the search tree.

Constructors

PruneAfterFirstSuccess Bool |