HORIZON HASKELLDocslts/ghc-9.14.x3e2d5682026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · 3e2d568 · 2026-10-11

Modulehorizon-config-shell-0.12.1GHC2024

Horizon.Config.Solve

Turn a set of roots into a complete, resolved package closure by driving cabal's own solver, then reading its plan.json. This is what the solve verb means: instead of the config listing every package by hand, it names the roots (root "cabal-install") and the indices, and the solver expands the full transitive closure — so a dependency like network can never be silently dropped.

The solve is real IO (it runs cabal against the pinned compiler and the declared indices), so it lives here in the shell, not in the pure config fold. It reuses cabal's SAT solver rather than reimplementing resolution; the plan it emits records each package's version and which index it came from, which is exactly the provenance the generated package set needs.

  • 4 types
  • 2 values
datadata SolveInput
#

Everything a solve needs. The compiler, base set and tools are the pinned toolchain's (Horizon.Config.Toolchain); the indices are the declared index names, mapped to their repository configuration.

Constructors

Instances2Eq, Show
  • Eq SolveInputDefined in horizon-config-shell-0.12.1 · Horizon.Config.Solve
  • Show SolveInputDefined in horizon-config-shell-0.12.1 · Horizon.Config.Solve
datadata Resolved
#

One resolved package: its name, version and the index it was drawn from (the repo.uri from the plan, mapped back to an index name).

Instances2Eq, Show
  • Eq ResolvedDefined in horizon-config-shell-0.12.1 · Horizon.Config.Solve
  • Show ResolvedDefined in horizon-config-shell-0.12.1 · Horizon.Config.Solve
datadata GitPin
#

A declared git package as the solve sees it: its repository, revision and subdirectory. It is not in any index, so the probe project names it as a source-repository-package; a root may then be a git package, and the plan resolves its dependencies like any other.

Instances2Eq, Show
  • Eq GitPinDefined in horizon-config-shell-0.12.1 · Horizon.Config.Solve
  • Show GitPinDefined in horizon-config-shell-0.12.1 · Horizon.Config.Solve
datadata SolveResult
#

The outcome of a solve: the packages to generate, and the boot libraries the compiler ships that the base set does not expose (which the generated set must mark null).

Constructors

Instances2Eq, Show
  • Eq SolveResultDefined in horizon-config-shell-0.12.1 · Horizon.Config.Solve
  • Show SolveResultDefined in horizon-config-shell-0.12.1 · Horizon.Config.Solve

Resolve the roots to their full transitive closure. Returns the configured repo packages to generate (the boot / GHC-bundled pre-existing packages are inherited, not generated), each with its version and source index, plus the boot libraries the compiler ships that the base set does not expose.