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-3.12.1.0Haskell2010

Distribution.Client.CmdRun

cabal-install CLI command: run

  • 8 values

The run CLI and action

4 declarations
valuerunAction :: NixStyleFlags () -> [String] -> GlobalFlags -> IO ()
#

The run command runs a specified executable-like component, building it first if necessary. The component can be either an executable, a test, or a benchmark. This is particularly useful for passing arguments to exestestsbenchs by simply appending them after a --.

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

valuehandleShebang :: FilePath -> [String] -> IO ()
#

Handle cabal invoked as script interpreter, see also validScript

First argument is the FilePath to the script to be executed; second argument is a list of arguments to be passed to the script.

valuevalidScript :: String -> IO Bool
#

Used by the main CLI parser as heuristic to decide whether cabal was invoked as a script interpreter, i.e. via

#! /usr/bin/env cabal

or

#! /usr/bin/cabal

As the first argument passed to cabal will be a filepath to the script to be interpreted.

See also handleShebang

Internals exposed for testing

4 declarations