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

GHC 9.14.1 · lts/ghc-9.14.x · b2f3bfd · 2026-10-11

Modulecabal-install-3.16.0.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. :: Verbosity
  2. -> AcceptNoTargets

    What your command should do when no targets are found.

  3. -> Maybe ComponentKind

    A target filter

  4. -> NixStyleFlags a

    Command line flags

  5. -> [String]

    Target strings or a script and args.

  6. -> GlobalFlags

    Global flags.

  7. -> CurrentCommand

    Current Command (usually for error reporting).

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

    The body of your command action.

  9. -> 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.16.0.0 · Distribution.Client.ScriptUtils
  • Show TargetContextDefined in cabal-install-3.16.0.0 · Distribution.Client.ScriptUtils