Distribution.Simple.Build.Inputs

Cabal-3.11.0.0: A framework for packaging Haskell software

Safe Haskell | None
Language | Haskell2010

Distribution.Simple.Build.Inputs

Contents

- Inputs of actions for building components
- Queries over the component being built
- Re-exports

Synopsis

- data PreBuildComponentInputs = PreBuildComponentInputs {
  - buildingWhat :: BuildingWhat
  - localBuildInfo :: LocalBuildInfo
  - targetInfo :: TargetInfo
  }
- buildVerbosity :: PreBuildComponentInputs -> Verbosity
- buildComponent :: PreBuildComponentInputs -> Component
- buildIsLib :: PreBuildComponentInputs -> Bool
- buildCLBI :: PreBuildComponentInputs -> ComponentLocalBuildInfo
- buildBI :: PreBuildComponentInputs -> BuildInfo
- buildCompiler :: PreBuildComponentInputs -> Compiler
- data BuildingWhat
  - = BuildNormal BuildFlags
  - | BuildRepl ReplFlags
  - | BuildHaddock HaddockFlags
  - | BuildHscolour HscolourFlags
- data LocalBuildInfo where
  - NewLocalBuildInfo {
    - localBuildDescr :: LocalBuildDescr
    - localBuildConfig :: LocalBuildConfig
    }
  - pattern LocalBuildInfo :: ConfigFlags -> FlagAssignment -> ComponentRequestedSpec -> [String] -> InstallDirTemplates -> Compiler -> Platform -> Maybe FilePath -> Graph ComponentLocalBuildInfo -> Map ComponentName [ComponentLocalBuildInfo] -> Map (PackageName, ComponentName) ComponentId -> InstalledPackageIndex -> PackageDescription -> ProgramDb -> PackageDBStack -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> ProfDetailLevel -> ProfDetailLevel -> OptimisationLevel -> DebugInfoLevel -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> [UnitId] -> Bool -> LocalBuildInfo
- data TargetInfo = TargetInfo {
  - targetCLBI :: ComponentLocalBuildInfo
  - targetComponent :: Component
  }
- buildingWhatVerbosity :: BuildingWhat -> Verbosity
- buildingWhatDistPref :: BuildingWhat -> FilePath

# Inputs of actions for building components

data PreBuildComponentInputs Source #

The information required for a build computation which is available right before building each component, i.e. the pre-build component inputs.

Constructors

PreBuildComponentInputs |
Fields buildingWhat :: BuildingWhat What kind of build are we doing? localBuildInfo :: LocalBuildInfo Information about the package targetInfo :: TargetInfo Information about an individual component

# Queries over the component being built

buildVerbosity :: PreBuildComponentInputs -> Verbosity Source #

Get the ``Verbosity`` from the context the component being built is in.

buildComponent :: PreBuildComponentInputs -> Component Source #

Get the ``Component`` being built.

buildIsLib :: PreBuildComponentInputs -> Bool Source #

Is the ``Component`` being built a ``Library``?

buildCLBI :: PreBuildComponentInputs -> ComponentLocalBuildInfo Source #

Get the ``ComponentLocalBuildInfo`` for the component being built.

buildBI :: PreBuildComponentInputs -> BuildInfo Source #

Get the ``BuildInfo`` of the component being built.

buildCompiler :: PreBuildComponentInputs -> Compiler Source #

Get the ``Compiler`` being used to build the component.

# Re-exports

data BuildingWhat Source #

What kind of build are we doing?

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

Instances details

Generic BuildingWhat Source # |
Instance details Defined in Distribution.Simple.Setup Associated Types
type Rep BuildingWhat |
Instance details Defined in Distribution.Simple.Setup type Rep BuildingWhat = D1 ('MetaData "BuildingWhat" "Distribution.Simple.Setup" "Cabal-3.11.0.0-7503" '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))))
Methods from :: BuildingWhat -> Rep BuildingWhat x # to :: Rep BuildingWhat x -> BuildingWhat #
Show BuildingWhat Source # |
Instance details Defined in Distribution.Simple.Setup Methods showsPrec :: Int -> BuildingWhat -> ShowS # show :: BuildingWhat -> String # showList :: [BuildingWhat] -> ShowS #
type Rep BuildingWhat Source # |
Instance details Defined in Distribution.Simple.Setup type Rep BuildingWhat = D1 ('MetaData "BuildingWhat" "Distribution.Simple.Setup" "Cabal-3.11.0.0-7503" '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))))

data LocalBuildInfo Source #

Data cached after configuration step. See also `ConfigFlags`.

Constructors

NewLocalBuildInfo |
Fields localBuildDescr :: LocalBuildDescr Information about a package determined by Cabal after the configuration step. localBuildConfig :: LocalBuildConfig Information about a package configuration that can be modified by the user at configuration time.

Bundled Patterns

pattern LocalBuildInfo :: ConfigFlags -> FlagAssignment -> ComponentRequestedSpec -> [String] -> InstallDirTemplates -> Compiler -> Platform -> Maybe FilePath -> Graph ComponentLocalBuildInfo -> Map ComponentName [ComponentLocalBuildInfo] -> Map (PackageName, ComponentName) ComponentId -> InstalledPackageIndex -> PackageDescription -> ProgramDb -> PackageDBStack -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> ProfDetailLevel -> ProfDetailLevel -> OptimisationLevel -> DebugInfoLevel -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> [UnitId] -> Bool -> LocalBuildInfo | This pattern synonym is for backwards compatibility, to adapt to `LocalBuildInfo` being split into `LocalBuildDescr` and `LocalBuildConfig`.

#### Instances

Instances details

Structured LocalBuildInfo Source # |
Instance details Defined in Distribution.Types.LocalBuildInfo Methods structure :: Proxy LocalBuildInfo -> Structure Source # structureHash' :: Tagged LocalBuildInfo MD5
Binary LocalBuildInfo Source # |
Instance details Defined in Distribution.Types.LocalBuildInfo Methods put :: LocalBuildInfo -> Put # get :: Get LocalBuildInfo # putList :: [LocalBuildInfo] -> Put #
Generic LocalBuildInfo Source # |
Instance details Defined in Distribution.Types.LocalBuildInfo Associated Types
type Rep LocalBuildInfo |
Instance details Defined in Distribution.Types.LocalBuildInfo type Rep LocalBuildInfo = D1 ('MetaData "LocalBuildInfo" "Distribution.Types.LocalBuildInfo" "Cabal-3.11.0.0-7503" 'False) (C1 ('MetaCons "NewLocalBuildInfo" 'PrefixI 'True) (S1 ('MetaSel ('Just "localBuildDescr") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 LocalBuildDescr) :*: S1 ('MetaSel ('Just "localBuildConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 LocalBuildConfig)))
Methods from :: LocalBuildInfo -> Rep LocalBuildInfo x # to :: Rep LocalBuildInfo x -> LocalBuildInfo #
Read LocalBuildInfo Source # |
Instance details Defined in Distribution.Types.LocalBuildInfo Methods readsPrec :: Int -> ReadS LocalBuildInfo # readList :: ReadS [LocalBuildInfo] # readPrec :: ReadPrec LocalBuildInfo # readListPrec :: ReadPrec [LocalBuildInfo] #
Show LocalBuildInfo Source # |
Instance details Defined in Distribution.Types.LocalBuildInfo Methods showsPrec :: Int -> LocalBuildInfo -> ShowS # show :: LocalBuildInfo -> String # showList :: [LocalBuildInfo] -> ShowS #
type Rep LocalBuildInfo Source # |
Instance details Defined in Distribution.Types.LocalBuildInfo type Rep LocalBuildInfo = D1 ('MetaData "LocalBuildInfo" "Distribution.Types.LocalBuildInfo" "Cabal-3.11.0.0-7503" 'False) (C1 ('MetaCons "NewLocalBuildInfo" 'PrefixI 'True) (S1 ('MetaSel ('Just "localBuildDescr") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 LocalBuildDescr) :*: S1 ('MetaSel ('Just "localBuildConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 LocalBuildConfig)))

data TargetInfo Source #

The `TargetInfo` contains all the information necessary to build a specific target (e.g., componentmodulefile) in a package. In principle, one can get the `Component` from a `ComponentLocalBuildInfo` and `LocalBuildInfo`, but it is much more convenient to have the component in hand.

Constructors

TargetInfo |
Fields targetCLBI :: ComponentLocalBuildInfo targetComponent :: Component

#### Instances

Instances details

IsNode TargetInfo Source # |
Instance details Defined in Distribution.Types.TargetInfo Associated Types
type Key TargetInfo |
Instance details Defined in Distribution.Types.TargetInfo type Key TargetInfo = UnitId
Methods nodeKey :: TargetInfo -> Key TargetInfo Source # nodeNeighbors :: TargetInfo -> [Key TargetInfo] Source #
Structured TargetInfo Source # |
Instance details Defined in Distribution.Types.TargetInfo Methods structure :: Proxy TargetInfo -> Structure Source # structureHash' :: Tagged TargetInfo MD5
Binary TargetInfo Source # |
Instance details Defined in Distribution.Types.TargetInfo Methods put :: TargetInfo -> Put # get :: Get TargetInfo # putList :: [TargetInfo] -> Put #
Generic TargetInfo Source # |
Instance details Defined in Distribution.Types.TargetInfo Associated Types
type Rep TargetInfo |
Instance details Defined in Distribution.Types.TargetInfo type Rep TargetInfo = D1 ('MetaData "TargetInfo" "Distribution.Types.TargetInfo" "Cabal-3.11.0.0-7503" 'False) (C1 ('MetaCons "TargetInfo" 'PrefixI 'True) (S1 ('MetaSel ('Just "targetCLBI") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ComponentLocalBuildInfo) :*: S1 ('MetaSel ('Just "targetComponent") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Component)))
Methods from :: TargetInfo -> Rep TargetInfo x # to :: Rep TargetInfo x -> TargetInfo #
Show TargetInfo Source # |
Instance details Defined in Distribution.Types.TargetInfo Methods showsPrec :: Int -> TargetInfo -> ShowS # show :: TargetInfo -> String # showList :: [TargetInfo] -> ShowS #
type Key TargetInfo Source # |
Instance details Defined in Distribution.Types.TargetInfo type Key TargetInfo = UnitId
type Rep TargetInfo Source # |
Instance details Defined in Distribution.Types.TargetInfo type Rep TargetInfo = D1 ('MetaData "TargetInfo" "Distribution.Types.TargetInfo" "Cabal-3.11.0.0-7503" 'False) (C1 ('MetaCons "TargetInfo" 'PrefixI 'True) (S1 ('MetaSel ('Just "targetCLBI") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ComponentLocalBuildInfo) :*: S1 ('MetaSel ('Just "targetComponent") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Component)))

buildingWhatVerbosity :: BuildingWhat -> Verbosity Source #

buildingWhatDistPref :: BuildingWhat -> FilePath Source #