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.ScriptUtils

Utilities to help commands with scripts

  • 2 types
  • 9 values

Get the hash of a script's absolute path.

Two hashes will be the same as long as the absolute paths are the same.

Get the directory for caching a script build.

The only identity of a script is it's absolute path, so append the hashed path to the script-builds dir to get the cache directory.

Get the directory for caching a script build and ensure it exists.

The only identity of a script is it's absolute path, so append the hashed path to the script-builds dir to get the cache directory.

valuewithContextAndSelectors
  1. :: AcceptNoTargets

    What your command should do when no targets are found.

  2. -> Maybe ComponentKind

    A target filter

  3. -> NixStyleFlags a

    Command line flags

  4. -> [String]

    Target strings or a script and args.

  5. -> GlobalFlags

    Global flags.

  6. -> CurrentCommand

    Current Command (usually for error reporting).

  7. -> (TargetContext -> ProjectBaseContext -> [TargetSelector] -> IO b)

    The body of your command action.

  8. -> IO b
#

Determine whether the targets represent regular targets or a script and return the proper context and target selectors. Die with an error message if selectors are valid as neither regular targets or as a script.

In the case that the context refers to a temporary directory, delete it after the action finishes.

datadata TargetContext
#

Information about the context in which we found the TargetSelectors.

Constructors

Instances2Eq, Show
  • Eq TargetContextDefined in cabal-install-3.12.1.0 · Distribution.Client.ScriptUtils
  • Show TargetContextDefined in cabal-install-3.12.1.0 · Distribution.Client.ScriptUtils