HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Modulecabal-install-solver-3.12.1.0Haskell2010

Distribution.Solver.Modular.Tree

  • 8 types
  • 8 values
datadata POption
#

A package option is a package instance with an optional linking annotation

The modular solver has a number of package goals to solve for, and can only pick a single package version for a single goal. In order to allow to install multiple versions of the same package as part of a single solution the solver uses qualified goals. For example, 0.P and 1.P might both be qualified goals for P, allowing to pick a difference version of package P for 0.P and 1.P.

Linking is an essential part of this story. In addition to picking a specific version for 1.P, the solver can also decide to link 1.P to 0.P (or vice versa). It means that 1.P and 0.P really must be the very same package (and hence must have the same build time configuration, and their dependencies must also be the exact same).

See http://www.well-typed.com/blog/2015/03/qualified-goals/ for details.

Constructors

Instances2Eq, Show
  • Eq POptionDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Tree
  • Show POptionDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Tree
datadata Tree d c
#

Type of the search tree. Inlining the choice nodes for now. Weights on package, flag, and stanza choices control the traversal order.

The tree can hold additional data on Done nodes (type d) and choice nodes (type c). For example, during the final traversal, choice nodes contain the variables that introduced the choices, and Done nodes contain the assignments for all variables.

TODO: The weight type should be changed from [Double] to Double to avoid giving too much weight to preferences that are applied later.

Constructors

datadata TreeF d c a
#

Functor for the tree type. a is the type of nodes' children. d and c have the same meaning as in Tree.

Instances3Functor, Foldable, Traversable
  • Functor (TreeF d c)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Tree
  • Foldable (TreeF d c)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Tree
  • Traversable (TreeF d c)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Tree
datadata FailReason
#
Instances2Eq, Show
  • Eq FailReasonDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Tree
  • Show FailReasonDefined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Modular.Tree
valueana :: (a -> TreeF d c a) -> a -> Tree d c
#

Anamorphism on trees.

valuecata :: (TreeF d c a -> a) -> Tree d c -> a
#

Catamorphism on trees.

valuezeroOrOneChoices :: Tree d c -> Bool
#

Approximates the number of active choices that are available in a node. Note that we count goal choices as having one choice, always.

valueactive :: Tree d c -> Bool
#

Determines whether a tree is active, i.e., isn't a failure node.