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

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