HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

Modulecabal-install-3.18.1.0Haskell2010

Distribution.Client.ScriptUtils

Utilities to help commands with scripts

Synopsis

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.

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. -> TargetsAction [TargetSelector] b
  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.18.1.0 · Distribution.Client.ScriptUtils
  • Show TargetContextDefined in cabal-install-3.18.1.0 · Distribution.Client.ScriptUtils