moduleDistribution.Simple.Build.Inputs(-- * Inputs of actions for building componentsPreBuildComponentInputs (..)-- * Queries over the component being built,buildVerbosity ,buildComponent ,buildIsLib ,buildCLBI ,buildBI ,buildCompiler -- * Re-exports,BuildingWhat (..),LocalBuildInfo (..),TargetInfo (..),buildingWhatCommonFlags ,buildingWhatVerbosity ,buildingWhatWorkingDir ,buildingWhatDistPref )whereimportDistribution.Simple.Compiler importDistribution.Simple.Setup hiding(BuildFlags (buildVerbosity ))importDistribution.Types.BuildInfoimportDistribution.Types.ComponentimportDistribution.Types.ComponentLocalBuildInfo importDistribution.Types.LocalBuildInfo importDistribution.Types.TargetInfo importDistribution.Verbosity -- | The information required for a build computation which is available right-- before building each component, i.e. the pre-build component inputs.dataPreBuildComponentInputs =PreBuildComponentInputs {PreBuildComponentInputs -> BuildingWhat
buildingWhat ::BuildingWhat -- ^ What kind of build are we doing?,PreBuildComponentInputs -> LocalBuildInfo
localBuildInfo ::LocalBuildInfo -- ^ Information about the package,PreBuildComponentInputs -> TargetInfo
targetInfo ::TargetInfo -- ^ Information about an individual component}-- | Get the @'Verbosity'@ from the context the component being built is in.buildVerbosity ::PreBuildComponentInputs ->Verbosity buildVerbosity :: PreBuildComponentInputs -> Verbosity
buildVerbosity =BuildingWhat -> Verbosity
buildingWhatVerbosity (BuildingWhat -> Verbosity)
-> (PreBuildComponentInputs -> BuildingWhat)
-> PreBuildComponentInputs
-> Verbosity
forall b c a. (b -> c) -> (a -> b) -> a -> c
.PreBuildComponentInputs -> BuildingWhat
buildingWhat -- | Get the @'Component'@ being built.buildComponent ::PreBuildComponentInputs ->ComponentbuildComponent :: PreBuildComponentInputs -> Component
buildComponent =TargetInfo -> Component
targetComponent (TargetInfo -> Component)
-> (PreBuildComponentInputs -> TargetInfo)
-> PreBuildComponentInputs
-> Component
forall b c a. (b -> c) -> (a -> b) -> a -> c
.PreBuildComponentInputs -> TargetInfo
targetInfo -- | Is the @'Component'@ being built a @'Library'@?buildIsLib ::PreBuildComponentInputs ->BoolbuildIsLib :: PreBuildComponentInputs -> Bool
buildIsLib =doComponent
component <-PreBuildComponentInputs -> Component
buildComponent letisLib :: Bool
isLib |CLib{}<-Component
component =Bool
True|Bool
otherwise=Bool
FalseBool -> PreBuildComponentInputs -> Bool
forall a. a -> PreBuildComponentInputs -> a
forall (m :: * -> *) a. Monad m => a -> m a
returnBool
isLib {-# INLINEbuildIsLib #-}-- | Get the @'ComponentLocalBuildInfo'@ for the component being built.buildCLBI ::PreBuildComponentInputs ->ComponentLocalBuildInfo buildCLBI :: PreBuildComponentInputs -> ComponentLocalBuildInfo
buildCLBI =TargetInfo -> ComponentLocalBuildInfo
targetCLBI (TargetInfo -> ComponentLocalBuildInfo)
-> (PreBuildComponentInputs -> TargetInfo)
-> PreBuildComponentInputs
-> ComponentLocalBuildInfo
forall b c a. (b -> c) -> (a -> b) -> a -> c
.PreBuildComponentInputs -> TargetInfo
targetInfo -- | Get the @'BuildInfo'@ of the component being built.buildBI ::PreBuildComponentInputs ->BuildInfobuildBI :: PreBuildComponentInputs -> BuildInfo
buildBI =Component -> BuildInfo
componentBuildInfo(Component -> BuildInfo)
-> (PreBuildComponentInputs -> Component)
-> PreBuildComponentInputs
-> BuildInfo
forall b c a. (b -> c) -> (a -> b) -> a -> c
.PreBuildComponentInputs -> Component
buildComponent -- | Get the @'Compiler'@ being used to build the component.buildCompiler ::PreBuildComponentInputs ->Compiler buildCompiler :: PreBuildComponentInputs -> Compiler
buildCompiler =LocalBuildInfo -> Compiler
compiler (LocalBuildInfo -> Compiler)
-> (PreBuildComponentInputs -> LocalBuildInfo)
-> PreBuildComponentInputs
-> Compiler
forall b c a. (b -> c) -> (a -> b) -> a -> c
.PreBuildComponentInputs -> LocalBuildInfo
localBuildInfo 

AltStyle によって変換されたページ (->オリジナル) /