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

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8174fa4 · 2026-10-11

ModuleCabal-3.18.1.0Haskell2010

Distribution.Simple.SetupHooks.HooksMain

Implementation of hooks executables for build-type: Hooks packages.

A hooks executable is a small program compiled from the SetupHooks.hs module of a package with build-type: Hooks. Its main function is:

import Distribution.Simple.SetupHooks.HooksMain (hooksMain)
import SetupHooks (setupHooks)
main = hooksMain setupHooks

cabal-install communicates with the external hooks executable to implement the hooks in a package with build-type: Hooks.

  • 3 types
  • 2 values
  • PackageCabal-3.18.1.0
  • Exports5
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceHooksMain.hs

Main entry point for hooks executables

1 declaration
valuehooksMain :: SetupHooks -> IO ()
#

Create a hooks executable main given the package's SetupHooks.

The executable expects three command-line arguments:

  1. A reference to an input communication handle (to read hook inputs from).

  2. A reference to an output communication handle (to write hook outputs to).

  3. The hook type to run.

The hook reads binary-encoded data from the input handle, runs the requested hook, and writes the binary-encoded result to the output handle.

Hooks version handshake

4 declarations
datadata HooksVersion
#

The version of the Hooks API in use.

Used for handshake before beginning inter-process communication.

Instances6Eq, Ord, Show, Generic, Binary, Rep

The version of the Hooks API built into this version of the Cabal library.

Used for handshake before beginning inter-process communication.

datadata CabalABI
#

Tracks the parts of the Cabal API relevant to its binary interface.

Instances3Generic, Structured, Rep
datadata HooksABI
#
Instances3Generic, Structured, Rep