| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Distribution.Simple.SetupHooks.Internal
Description
Internal implementation module.
Users of build-type: Hooks should import Distribution.Simple.SetupHooks
instead.
Synopsis
- data SetupHooks = SetupHooks {}
- noSetupHooks :: SetupHooks
- data ConfigureHooks = ConfigureHooks {}
- noConfigureHooks :: ConfigureHooks
- data PreConfPackageInputs = PreConfPackageInputs {}
- data PreConfPackageOutputs = PreConfPackageOutputs {}
- noPreConfPackageOutputs :: PreConfPackageInputs -> PreConfPackageOutputs
- type PreConfPackageHook = PreConfPackageInputs -> IO PreConfPackageOutputs
- data PostConfPackageInputs = PostConfPackageInputs {}
- type PostConfPackageHook = PostConfPackageInputs -> IO ()
- data PreConfComponentInputs = PreConfComponentInputs {}
- data PreConfComponentOutputs = PreConfComponentOutputs {}
- noPreConfComponentOutputs :: PreConfComponentInputs -> PreConfComponentOutputs
- type PreConfComponentHook = PreConfComponentInputs -> IO PreConfComponentOutputs
- newtype ComponentDiff = ComponentDiff {}
- emptyComponentDiff :: ComponentName -> ComponentDiff
- buildInfoComponentDiff :: ComponentName -> BuildInfo -> ComponentDiff
- type LibraryDiff = Library
- type ForeignLibDiff = ForeignLib
- type ExecutableDiff = Executable
- type TestSuiteDiff = TestSuite
- type BenchmarkDiff = Benchmark
- type BuildInfoDiff = BuildInfo
- data BuildHooks = BuildHooks {}
- noBuildHooks :: BuildHooks
- data BuildingWhat
- buildingWhatVerbosity :: BuildingWhat -> Verbosity
- buildingWhatWorkingDir :: BuildingWhat -> Maybe (SymbolicPath CWD ('Dir Pkg))
- buildingWhatDistPref :: BuildingWhat -> SymbolicPath Pkg ('Dir Dist)
- data PreBuildComponentInputs = PreBuildComponentInputs {}
- type PreBuildComponentRules = Rules PreBuildComponentInputs
- data PostBuildComponentInputs = PostBuildComponentInputs {}
- type PostBuildComponentHook = PostBuildComponentInputs -> IO ()
- data InstallHooks = InstallHooks {}
- noInstallHooks :: InstallHooks
- data InstallComponentInputs = InstallComponentInputs {}
- type InstallComponentHook = InstallComponentInputs -> IO ()
- applyComponentDiffs :: Verbosity -> (Component -> IO (Maybe ComponentDiff)) -> PackageDescription -> IO PackageDescription
- forComponents_ :: PackageDescription -> (Component -> IO ()) -> IO ()
- executeRules :: Verbosity -> LocalBuildInfo -> TargetInfo -> Map RuleId Rule -> IO ()
- hookedBuildInfoComponents :: HookedBuildInfo -> Set ComponentName
- hookedBuildInfoComponentDiff_maybe :: HookedBuildInfo -> ComponentName -> Maybe (IO ComponentDiff)
The setup hooks datatype
data SetupHooks Source #
Hooks into the cabal build phases.
Usage:
- In your
.cabalfile, declarebuild-type: Hooks(with acabal-versiongreater than or equal to3.14), - In your
.cabalfile, include acustom-setupstanza which declares the dependencies of yourSetupHooksmodule; this will usually contain a dependency on theCabal-hookspackage. - Provide a
SetupHooks.hsmodule next to your.cabalfile; it must exportsetupHooks :: SetupHooks.
Constructors
| SetupHooks | |
Fields
| |
Instances
| Monoid SetupHooks Source # | |
Defined in Distribution.Simple.SetupHooks.Internal Methods mempty :: SetupHooks # mappend :: SetupHooks -> SetupHooks -> SetupHooks # mconcat :: [SetupHooks] -> SetupHooks # | |
| Semigroup SetupHooks Source # |
Warning: this |
Defined in Distribution.Simple.SetupHooks.Internal Methods (<>) :: SetupHooks -> SetupHooks -> SetupHooks # sconcat :: NonEmpty SetupHooks -> SetupHooks # stimes :: Integral b => b -> SetupHooks -> SetupHooks # | |
noSetupHooks :: SetupHooks Source #
Empty hooks.
Configure hooks
data ConfigureHooks Source #
Configure-time hooks.
Order of execution:
preConfPackageHook,- configure the package,
postConfPackageHook,preConfComponentHook,- configure the components.
Constructors
| ConfigureHooks | |
Fields
| |
Instances
| Monoid ConfigureHooks Source # | |
Defined in Distribution.Simple.SetupHooks.Internal Methods mappend :: ConfigureHooks -> ConfigureHooks -> ConfigureHooks # mconcat :: [ConfigureHooks] -> ConfigureHooks # | |
| Semigroup ConfigureHooks Source # | |
Defined in Distribution.Simple.SetupHooks.Internal Methods (<>) :: ConfigureHooks -> ConfigureHooks -> ConfigureHooks # sconcat :: NonEmpty ConfigureHooks -> ConfigureHooks # stimes :: Integral b => b -> ConfigureHooks -> ConfigureHooks # | |
noConfigureHooks :: ConfigureHooks Source #
Empty configure phase hooks.
Per-package configure hooks
data PreConfPackageInputs Source #
Inputs to the package-wide pre-configure step.
Constructors
| PreConfPackageInputs | |
Fields
| |
Instances
data PreConfPackageOutputs Source #
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.
Constructors
| PreConfPackageOutputs | |
Fields | |
Instances
| Structured PreConfPackageOutputs Source # | |||||
Defined in Distribution.Simple.SetupHooks.Internal Methods structure :: Proxy PreConfPackageOutputs -> Structure # structureHash' :: Tagged PreConfPackageOutputs MD5 | |||||
| Generic PreConfPackageOutputs Source # | |||||
Defined in Distribution.Simple.SetupHooks.Internal Associated Types
Methods from :: PreConfPackageOutputs -> Rep PreConfPackageOutputs x # to :: Rep PreConfPackageOutputs x -> PreConfPackageOutputs # | |||||
| Show PreConfPackageOutputs Source # | |||||
Defined in Distribution.Simple.SetupHooks.Internal Methods showsPrec :: Int -> PreConfPackageOutputs -> ShowS # show :: PreConfPackageOutputs -> String # showList :: [PreConfPackageOutputs] -> ShowS # | |||||
| Binary PreConfPackageOutputs Source # | |||||
Defined in Distribution.Simple.SetupHooks.Internal Methods put :: PreConfPackageOutputs -> Put # get :: Get PreConfPackageOutputs # putList :: [PreConfPackageOutputs] -> Put # | |||||
| type Rep PreConfPackageOutputs Source # | |||||
Defined in Distribution.Simple.SetupHooks.Internal type Rep PreConfPackageOutputs = D1 ('MetaData "PreConfPackageOutputs" "Distribution.Simple.SetupHooks.Internal" "Cabal-3.16.0.0-1YZHuvI2dgR4GlGeuk23es" 'False) (C1 ('MetaCons "PreConfPackageOutputs" 'PrefixI 'True) (S1 ('MetaSel ('Just "buildOptions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BuildOptions) :*: S1 ('MetaSel ('Just "extraConfiguredProgs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ConfiguredProgs))) | |||||
noPreConfPackageOutputs :: PreConfPackageInputs -> PreConfPackageOutputs Source #
Use this smart constructor to declare an empty set of changes by the package-wide pre-configure hook, and override the fields you care about.
Use this rather than PreConfPackageOutputs to avoid relying on
internal implementation details of the latter.
data PostConfPackageInputs Source #
Inputs to the package-wide post-configure step.
Constructors
| PostConfPackageInputs | |
Instances
| Structured PostConfPackageInputs Source # | |||||
Defined in Distribution.Simple.SetupHooks.Internal Methods structure :: Proxy PostConfPackageInputs -> Structure # structureHash' :: Tagged PostConfPackageInputs MD5 | |||||
| Generic PostConfPackageInputs Source # | |||||
Defined in Distribution.Simple.SetupHooks.Internal Associated Types
Methods from :: PostConfPackageInputs -> Rep PostConfPackageInputs x # to :: Rep PostConfPackageInputs x -> PostConfPackageInputs # | |||||
| Show PostConfPackageInputs Source # | |||||
Defined in Distribution.Simple.SetupHooks.Internal Methods showsPrec :: Int -> PostConfPackageInputs -> ShowS # show :: PostConfPackageInputs -> String # showList :: [PostConfPackageInputs] -> ShowS # | |||||
| Binary PostConfPackageInputs Source # | |||||
Defined in Distribution.Simple.SetupHooks.Internal Methods put :: PostConfPackageInputs -> Put # get :: Get PostConfPackageInputs # putList :: [PostConfPackageInputs] -> Put # | |||||
| type Rep PostConfPackageInputs Source # | |||||
Defined in Distribution.Simple.SetupHooks.Internal type Rep PostConfPackageInputs = D1 ('MetaData "PostConfPackageInputs" "Distribution.Simple.SetupHooks.Internal" "Cabal-3.16.0.0-1YZHuvI2dgR4GlGeuk23es" 'False) (C1 ('MetaCons "PostConfPackageInputs" 'PrefixI 'True) (S1 ('MetaSel ('Just "localBuildConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 LocalBuildConfig) :*: S1 ('MetaSel ('Just "packageBuildDescr") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PackageBuildDescr))) | |||||
type PostConfPackageHook = PostConfPackageInputs -> IO () Source #
Package-wide post-configure step.
Perform side effects. Last opportunity for any package-wide logic; any subsequent hooks work per-component.
Per-component configure hooks
data PreConfComponentInputs Source #
Inputs to the per-component pre-configure step.
Constructors
| PreConfComponentInputs | |
Instances
| Structured PreConfComponentInputs Source # | |||||
Defined in Distribution.Simple.SetupHooks.Internal Methods structure :: Proxy PreConfComponentInputs -> Structure # structureHash' :: Tagged PreConfComponentInputs MD5 | |||||
| Generic PreConfComponentInputs Source # | |||||
Defined in Distribution.Simple.SetupHooks.Internal Associated Types
Methods from :: PreConfComponentInputs -> Rep PreConfComponentInputs x # to :: Rep PreConfComponentInputs x -> PreConfComponentInputs # | |||||
| Show PreConfComponentInputs Source # | |||||
Defined in Distribution.Simple.SetupHooks.Internal Methods showsPrec :: Int -> PreConfComponentInputs -> ShowS # show :: PreConfComponentInputs -> String # showList :: [PreConfComponentInputs] -> ShowS # | |||||
| Binary PreConfComponentInputs Source # | |||||
Defined in Distribution.Simple.SetupHooks.Internal Methods put :: PreConfComponentInputs -> Put # get :: Get PreConfComponentInputs # putList :: [PreConfComponentInputs] -> Put # | |||||
| type Rep PreConfComponentInputs Source # | |||||
Defined in Distribution.Simple.SetupHooks.Internal type Rep PreConfComponentInputs = D1 ('MetaData "PreConfComponentInputs" "Distribution.Simple.SetupHooks.Internal" "Cabal-3.16.0.0-1YZHuvI2dgR4GlGeuk23es" 'False) (C1 ('MetaCons "PreConfComponentInputs" 'PrefixI 'True) (S1 ('MetaSel ('Just "localBuildConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 LocalBuildConfig) :*: (S1 ('MetaSel ('Just "packageBuildDescr") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PackageBuildDescr) :*: S1 ('MetaSel ('Just "component") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Component)))) | |||||
data PreConfComponentOutputs Source #
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.
Constructors
| PreConfComponentOutputs | |
Fields | |
Instances
| Structured PreConfComponentOutputs Source # | |||||
Defined in Distribution.Simple.SetupHooks.Internal Methods structure :: Proxy PreConfComponentOutputs -> Structure # structureHash' :: Tagged PreConfComponentOutputs MD5 | |||||
| Generic PreConfComponentOutputs Source # | |||||
Defined in Distribution.Simple.SetupHooks.Internal Associated Types
Methods from :: PreConfComponentOutputs -> Rep PreConfComponentOutputs x # to :: Rep PreConfComponentOutputs x -> PreConfComponentOutputs # | |||||
| Show PreConfComponentOutputs Source # | |||||
Defined in Distribution.Simple.SetupHooks.Internal Methods showsPrec :: Int -> PreConfComponentOutputs -> ShowS # show :: PreConfComponentOutputs -> String # showList :: [PreConfComponentOutputs] -> ShowS # | |||||
| Binary PreConfComponentOutputs Source # | |||||
Defined in Distribution.Simple.SetupHooks.Internal Methods put :: PreConfComponentOutputs -> Put # get :: Get PreConfComponentOutputs # putList :: [PreConfComponentOutputs] -> Put # | |||||
| type Rep PreConfComponentOutputs Source # | |||||
Defined in Distribution.Simple.SetupHooks.Internal type Rep PreConfComponentOutputs = D1 ('MetaData "PreConfComponentOutputs" "Distribution.Simple.SetupHooks.Internal" "Cabal-3.16.0.0-1YZHuvI2dgR4GlGeuk23es" 'False) (C1 ('MetaCons "PreConfComponentOutputs" 'PrefixI 'True) (S1 ('MetaSel ('Just "componentDiff") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ComponentDiff))) | |||||
noPreConfComponentOutputs :: PreConfComponentInputs -> PreConfComponentOutputs Source #
Use this smart constructor to declare an empty set of changes by a per-component pre-configure hook, and override the fields you care about.
Use this rather than PreConfComponentOutputs to avoid relying on
internal implementation details of the latter.
type PreConfComponentHook = PreConfComponentInputs -> IO PreConfComponentOutputs Source #
Per-component pre-configure step.
For each component of the package, this hook can perform side effects, and return a diff to the passed in component, e.g. to declare additional autogenerated modules.
newtype ComponentDiff Source #
Constructors
| ComponentDiff | |
Fields | |
Instances
| Structured ComponentDiff Source # | |
Defined in Distribution.Simple.SetupHooks.Internal | |
| Semigroup ComponentDiff Source # | |
Defined in Distribution.Simple.SetupHooks.Internal Methods (<>) :: ComponentDiff -> ComponentDiff -> ComponentDiff # sconcat :: NonEmpty ComponentDiff -> ComponentDiff # stimes :: Integral b => b -> ComponentDiff -> ComponentDiff # | |
| Show ComponentDiff Source # | |
Defined in Distribution.Simple.SetupHooks.Internal Methods showsPrec :: Int -> ComponentDiff -> ShowS # show :: ComponentDiff -> String # showList :: [ComponentDiff] -> ShowS # | |
| Binary ComponentDiff Source # | |
Defined in Distribution.Simple.SetupHooks.Internal | |
type LibraryDiff = Library Source #
type ForeignLibDiff = ForeignLib Source #
type ExecutableDiff = Executable Source #
type TestSuiteDiff = TestSuite Source #
type BenchmarkDiff = Benchmark Source #
type BuildInfoDiff = BuildInfo Source #
Build hooks
data BuildHooks Source #
Build-time hooks.
Constructors
| BuildHooks | |
Fields
| |
Instances
| Monoid BuildHooks Source # | |
Defined in Distribution.Simple.SetupHooks.Internal Methods mempty :: BuildHooks # mappend :: BuildHooks -> BuildHooks -> BuildHooks # mconcat :: [BuildHooks] -> BuildHooks # | |
| Semigroup BuildHooks Source # | |
Defined in Distribution.Simple.SetupHooks.Internal Methods (<>) :: BuildHooks -> BuildHooks -> BuildHooks # sconcat :: NonEmpty BuildHooks -> BuildHooks # stimes :: Integral b => b -> BuildHooks -> BuildHooks # | |
noBuildHooks :: BuildHooks Source #
Empty build hooks.
data BuildingWhat Source #
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
| BuildNormal BuildFlags | A normal build. |
| BuildRepl ReplFlags | Build steps for an interactive session. |
| BuildHaddock HaddockFlags | Build steps for generating documentation. |
| BuildHscolour HscolourFlags | Build steps for Hscolour. |
Instances
| Structured BuildingWhat Source # | |||||
Defined in Distribution.Simple.Setup | |||||
| Generic BuildingWhat Source # | |||||
Defined in Distribution.Simple.Setup Associated Types
| |||||
| Show BuildingWhat Source # | |||||
Defined in Distribution.Simple.Setup Methods showsPrec :: Int -> BuildingWhat -> ShowS # show :: BuildingWhat -> String # showList :: [BuildingWhat] -> ShowS # | |||||
| Binary BuildingWhat Source # | |||||
Defined in Distribution.Simple.Setup | |||||
| type Rep BuildingWhat Source # | |||||
Defined in Distribution.Simple.Setup type Rep BuildingWhat = D1 ('MetaData "BuildingWhat" "Distribution.Simple.Setup" "Cabal-3.16.0.0-1YZHuvI2dgR4GlGeuk23es" 'False) ((C1 ('MetaCons "BuildNormal" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BuildFlags)) :+: C1 ('MetaCons "BuildRepl" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ReplFlags))) :+: (C1 ('MetaCons "BuildHaddock" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 HaddockFlags)) :+: C1 ('MetaCons "BuildHscolour" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 HscolourFlags)))) | |||||
buildingWhatWorkingDir :: BuildingWhat -> Maybe (SymbolicPath CWD ('Dir Pkg)) Source #
buildingWhatDistPref :: BuildingWhat -> SymbolicPath Pkg ('Dir Dist) Source #
Pre-build rules
data PreBuildComponentInputs Source #
Constructors
| PreBuildComponentInputs | |
Fields
| |
Instances
| Structured PreBuildComponentInputs Source # | |||||
Defined in Distribution.Simple.SetupHooks.Internal Methods structure :: Proxy PreBuildComponentInputs -> Structure # structureHash' :: Tagged PreBuildComponentInputs MD5 | |||||
| Generic PreBuildComponentInputs Source # | |||||
Defined in Distribution.Simple.SetupHooks.Internal Associated Types
Methods from :: PreBuildComponentInputs -> Rep PreBuildComponentInputs x # to :: Rep PreBuildComponentInputs x -> PreBuildComponentInputs # | |||||
| Show PreBuildComponentInputs Source # | |||||
Defined in Distribution.Simple.SetupHooks.Internal Methods showsPrec :: Int -> PreBuildComponentInputs -> ShowS # show :: PreBuildComponentInputs -> String # showList :: [PreBuildComponentInputs] -> ShowS # | |||||
| Binary PreBuildComponentInputs Source # | |||||
Defined in Distribution.Simple.SetupHooks.Internal Methods put :: PreBuildComponentInputs -> Put # get :: Get PreBuildComponentInputs # putList :: [PreBuildComponentInputs] -> Put # | |||||
| type Rep PreBuildComponentInputs Source # | |||||
Defined in Distribution.Simple.SetupHooks.Internal type Rep PreBuildComponentInputs = D1 ('MetaData "PreBuildComponentInputs" "Distribution.Simple.SetupHooks.Internal" "Cabal-3.16.0.0-1YZHuvI2dgR4GlGeuk23es" 'False) (C1 ('MetaCons "PreBuildComponentInputs" 'PrefixI 'True) (S1 ('MetaSel ('Just "buildingWhat") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BuildingWhat) :*: (S1 ('MetaSel ('Just "localBuildInfo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 LocalBuildInfo) :*: S1 ('MetaSel ('Just "targetInfo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TargetInfo)))) | |||||
Post-build hook
data PostBuildComponentInputs Source #
Constructors
| PostBuildComponentInputs | |
Fields | |
Instances
| Structured PostBuildComponentInputs Source # | |||||
Defined in Distribution.Simple.SetupHooks.Internal Methods structure :: Proxy PostBuildComponentInputs -> Structure # structureHash' :: Tagged PostBuildComponentInputs MD5 | |||||
| Generic PostBuildComponentInputs Source # | |||||
Defined in Distribution.Simple.SetupHooks.Internal Associated Types
Methods from :: PostBuildComponentInputs -> Rep PostBuildComponentInputs x # to :: Rep PostBuildComponentInputs x -> PostBuildComponentInputs # | |||||
| Show PostBuildComponentInputs Source # | |||||
Defined in Distribution.Simple.SetupHooks.Internal Methods showsPrec :: Int -> PostBuildComponentInputs -> ShowS # show :: PostBuildComponentInputs -> String # showList :: [PostBuildComponentInputs] -> ShowS # | |||||
| Binary PostBuildComponentInputs Source # | |||||
Defined in Distribution.Simple.SetupHooks.Internal Methods put :: PostBuildComponentInputs -> Put # get :: Get PostBuildComponentInputs # putList :: [PostBuildComponentInputs] -> Put # | |||||
| type Rep PostBuildComponentInputs Source # | |||||
Defined in Distribution.Simple.SetupHooks.Internal type Rep PostBuildComponentInputs = D1 ('MetaData "PostBuildComponentInputs" "Distribution.Simple.SetupHooks.Internal" "Cabal-3.16.0.0-1YZHuvI2dgR4GlGeuk23es" 'False) (C1 ('MetaCons "PostBuildComponentInputs" 'PrefixI 'True) (S1 ('MetaSel ('Just "buildFlags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BuildFlags) :*: (S1 ('MetaSel ('Just "localBuildInfo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 LocalBuildInfo) :*: S1 ('MetaSel ('Just "targetInfo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TargetInfo)))) | |||||
type PostBuildComponentHook = PostBuildComponentInputs -> IO () Source #
Install hooks
data InstallHooks Source #
Copy/install hooks.
Constructors
| InstallHooks | |
Fields
| |
Instances
| Monoid InstallHooks Source # | |
Defined in Distribution.Simple.SetupHooks.Internal Methods mempty :: InstallHooks # mappend :: InstallHooks -> InstallHooks -> InstallHooks # mconcat :: [InstallHooks] -> InstallHooks # | |
| Semigroup InstallHooks Source # | |
Defined in Distribution.Simple.SetupHooks.Internal Methods (<>) :: InstallHooks -> InstallHooks -> InstallHooks # sconcat :: NonEmpty InstallHooks -> InstallHooks # stimes :: Integral b => b -> InstallHooks -> InstallHooks # | |
noInstallHooks :: InstallHooks Source #
Empty copy/install hooks.
data InstallComponentInputs Source #
Constructors
| InstallComponentInputs | |
Fields | |
Instances
| Structured InstallComponentInputs Source # | |||||
Defined in Distribution.Simple.SetupHooks.Internal Methods structure :: Proxy InstallComponentInputs -> Structure # structureHash' :: Tagged InstallComponentInputs MD5 | |||||
| Generic InstallComponentInputs Source # | |||||
Defined in Distribution.Simple.SetupHooks.Internal Associated Types
Methods from :: InstallComponentInputs -> Rep InstallComponentInputs x # to :: Rep InstallComponentInputs x -> InstallComponentInputs # | |||||
| Show InstallComponentInputs Source # | |||||
Defined in Distribution.Simple.SetupHooks.Internal Methods showsPrec :: Int -> InstallComponentInputs -> ShowS # show :: InstallComponentInputs -> String # showList :: [InstallComponentInputs] -> ShowS # | |||||
| Binary InstallComponentInputs Source # | |||||
Defined in Distribution.Simple.SetupHooks.Internal Methods put :: InstallComponentInputs -> Put # get :: Get InstallComponentInputs # putList :: [InstallComponentInputs] -> Put # | |||||
| type Rep InstallComponentInputs Source # | |||||
Defined in Distribution.Simple.SetupHooks.Internal type Rep InstallComponentInputs = D1 ('MetaData "InstallComponentInputs" "Distribution.Simple.SetupHooks.Internal" "Cabal-3.16.0.0-1YZHuvI2dgR4GlGeuk23es" 'False) (C1 ('MetaCons "InstallComponentInputs" 'PrefixI 'True) (S1 ('MetaSel ('Just "copyFlags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CopyFlags) :*: (S1 ('MetaSel ('Just "localBuildInfo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 LocalBuildInfo) :*: S1 ('MetaSel ('Just "targetInfo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TargetInfo)))) | |||||
type InstallComponentHook = InstallComponentInputs -> IO () Source #
A per-component install hook, which can only perform side effects (e.g. copying files).
Internals
Per-component hook utilities
applyComponentDiffs :: Verbosity -> (Component -> IO (Maybe ComponentDiff)) -> PackageDescription -> IO PackageDescription Source #
forComponents_ :: PackageDescription -> (Component -> IO ()) -> IO () Source #
Executing build rules
executeRules :: Verbosity -> LocalBuildInfo -> TargetInfo -> Map RuleId Rule -> IO () Source #
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).