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

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

ModuleCabal-3.18.1.0Haskell2010

Distribution.Simple.SetupHooks.Internal

Internal implementation module for SetupHooks.

Users of build-type: Hooks should import Distribution.Simple.SetupHooks instead.

  • 26 types
  • 17 values
  • PackageCabal-3.18.1.0
  • Exports43
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceInternal.hs

The setup hooks datatype

2 declarations
datadata SetupHooks
#

Hooks into the cabal build phases.

Usage:

  • In your .cabal file, declare build-type: Hooks (with a cabal-version greater than or equal to 3.14),

  • In your .cabal file, include a custom-setup stanza which declares the dependencies of your SetupHooks module; this will usually contain a dependency on the Cabal-hooks package.

  • Provide a SetupHooks.hs module next to your .cabal file; it must export setupHooks :: SetupHooks.

Constructors

Instances2Semigroup, Monoid
  • Semigroup SetupHooksDefined in Cabal-3.18.1.0 · Distribution.Simple.SetupHooks.Internal

    SetupHooks can be combined monoidally. This is useful to combine setup hooks defined by another package with your own package-specific hooks.

    Warning: this Semigroup instance is not commutative.

  • Monoid SetupHooksDefined in Cabal-3.18.1.0 · Distribution.Simple.SetupHooks.Internal

Configure hooks

2 declarations
datadata ConfigureHooks
#

Configure-time hooks.

Order of execution:

Constructors

Instances2Semigroup, Monoid

Per-package configure hooks

datadata PreConfPackageInputs
#

Inputs to the package-wide pre-configure step.

Constructors

Instances5Show, Generic, Binary, Structured, Rep

Outputs of the package-wide pre-configure step.

Prefer using noPreConfPackageOutputs and overriding the fields you care about, to avoid depending on implementation details of this datatype.

Instances5Show, Generic, Binary, Structured, Rep

Inputs to the package-wide post-configure step.

Instances5Show, Generic, Binary, Structured, Rep

Per-component configure hooks

Inputs to the per-component pre-configure step.

Instances5Show, Generic, Binary, Structured, Rep

Outputs of the per-component pre-configure step.

Prefer using noPreComponentOutputs and overriding the fields you care about, to avoid depending on implementation details of this datatype.

Instances5Show, Generic, Binary, Structured, Rep
newtypenewtype ComponentDiff
#

A diff to a Cabal Component, that gets combined monoidally into an existing Component.

Instances4Show, Semigroup, Binary, Structured

Build hooks

6 declarations
datadata BuildingWhat
#

What kind of build phase are we doing/hooking into?

Is this a normal build, or is it perhaps for running an interactive session or Haddock?

Constructors

Instances5Show, Generic, Binary, Structured, Rep

Pre-build rules

Constructors

Instances5Show, Generic, Binary, Structured, Rep

Post-build hook

Instances5Show, Generic, Binary, Structured, Rep

Install hooks

4 declarations
Instances5Show, Generic, Binary, Structured, Rep

Internals

0 declarations

Per-component hook utilities

Executing build rules

Run all pre-build rules.

This function should only be called internally within Cabal, as it is used to implement the (legacy) Setup.hs interface. The build tool (e.g. cabal-install or hls) should instead go through the separate hooks executable, which allows us to only rerun the out-of-date rules (instead of running all of these rules at once).

HookedBuildInfo compatibility code