HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulecabal-install-3.12.1.0Haskell2010

Distribution.Client.CmdRepl

cabal-install CLI command: repl

  • 2 types
  • 5 values

The repl CLI and action

3 declarations

The repl command is very much like build. It brings the install plan up to date, selects that part of the plan needed by the given or implicit repl target and then executes the plan.

Compared to build the difference is that multiple targets are handled specially and the target type is repl rather than build. The general plan execution infrastructure handles both build and repl targets.

For more details on how this works, see the module Distribution.Client.ProjectOrchestration

Internals exposed for testing

4 declarations
valueselectPackageTargets
  1. :: MultiReplDecision
  2. -> TargetSelector
  3. -> [AvailableTarget k]
  4. -> Either ReplTargetProblem [k]
#

This defines what a TargetSelector means for the repl command. It selects the AvailableTargets that the TargetSelector refers to, or otherwise classifies the problem.

For repl we select:

  • the library if there is only one and it's buildable; or

  • the exe if there is only one and it's buildable; or

  • any other buildable component.

Fail if there are no buildable lib/exe components, or if there are multiple libs or exes.