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

GHC 10.0.0.20260917 · lts/ghc-10.0.x · fc4e598 · 2026-10-11

Modulecabal-install-3.18.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