| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Distribution.Simple.SetupHooks.HooksMain
Description
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.
Synopsis
- hooksMain :: SetupHooks -> IO ()
- data HooksVersion = HooksVersion {
- hooksAPIVersion :: !Version
- cabalABIHash :: !MD5
- hooksABIHash :: !MD5
- hooksVersion :: HooksVersion
- data CabalABI = CabalABI {}
- data HooksABI = HooksABI {}
Main entry point for hooks executables
hooksMain :: SetupHooks -> IO () Source #
Create a hooks executable main given the package's SetupHooks.
The executable expects three command-line arguments:
- A reference to an input communication handle (to read hook inputs from).
- A reference to an output communication handle (to write hook outputs to).
- 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
data HooksVersion Source #
The version of the Hooks API in use.
Used for handshake before beginning inter-process communication.
Constructors
| HooksVersion | |
Fields
| |
Instances
hooksVersion :: HooksVersion Source #
The version of the Hooks API built into this version of the Cabal library.
Used for handshake before beginning inter-process communication.
Tracks the parts of the Cabal API relevant to its binary interface.
Constructors
| CabalABI | |
Fields | |
Instances
| Structured CabalABI Source # | |||||
Defined in Distribution.Simple.SetupHooks.HooksMain | |||||
| Generic CabalABI Source # | |||||
Defined in Distribution.Simple.SetupHooks.HooksMain Associated Types
| |||||
| type Rep CabalABI Source # | |||||
Defined in Distribution.Simple.SetupHooks.HooksMain type Rep CabalABI = D1 ('MetaData "CabalABI" "Distribution.Simple.SetupHooks.HooksMain" "Cabal-3.18.1.0-inplace" 'False) (C1 ('MetaCons "CabalABI" 'PrefixI 'True) (S1 ('MetaSel ('Just "cabalLocalBuildInfo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 LocalBuildInfo))) | |||||
Tracks the parts of the Hooks API relevant to its binary interface.
Constructors
| HooksABI | |
Instances
| Structured HooksABI Source # | |||||
Defined in Distribution.Simple.SetupHooks.HooksMain | |||||
| Generic HooksABI Source # | |||||
Defined in Distribution.Simple.SetupHooks.HooksMain Associated Types
| |||||
| type Rep HooksABI Source # | |||||
Defined in Distribution.Simple.SetupHooks.HooksMain type Rep HooksABI = D1 ('MetaData "HooksABI" "Distribution.Simple.SetupHooks.HooksMain" "Cabal-3.18.1.0-inplace" 'False) (C1 ('MetaCons "HooksABI" 'PrefixI 'True) (S1 ('MetaSel ('Just "confHooks") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ((PreConfPackageInputs, PreConfPackageOutputs), PostConfPackageInputs, (PreConfComponentInputs, PreConfComponentOutputs))) :*: (S1 ('MetaSel ('Just "buildHooks") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (PreBuildComponentInputs, (RuleId, Rule, RuleBinary), PostBuildComponentInputs)) :*: S1 ('MetaSel ('Just "installHooks") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 InstallComponentInputs)))) | |||||