Cabal-3.0.0.0: A framework for packaging Haskell software

Safe HaskellNone
LanguageHaskell2010

Distribution.Types.LocalBuildInfo

Contents

Synopsis

The type

data LocalBuildInfo #

Data cached after configuration step. See also ConfigFlags.

Constructors

LocalBuildInfo 

Fields

Instances
Read LocalBuildInfo # 
Instance details

Defined in Distribution.Types.LocalBuildInfo

Show LocalBuildInfo # 
Instance details

Defined in Distribution.Types.LocalBuildInfo

Generic LocalBuildInfo # 
Instance details

Defined in Distribution.Types.LocalBuildInfo

Associated Types

type Rep LocalBuildInfo :: Type -> Type #

Binary LocalBuildInfo # 
Instance details

Defined in Distribution.Types.LocalBuildInfo

type Rep LocalBuildInfo # 
Instance details

Defined in Distribution.Types.LocalBuildInfo

type Rep LocalBuildInfo = D1 (MetaData "LocalBuildInfo" "Distribution.Types.LocalBuildInfo" "Cabal-3.0.0.0-CD1INMNwoxXIKVgcu1nec5" False) (C1 (MetaCons "LocalBuildInfo" PrefixI True) (((((S1 (MetaSel (Just "configFlags") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ConfigFlags) :*: S1 (MetaSel (Just "flagAssignment") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 FlagAssignment)) :*: (S1 (MetaSel (Just "componentEnabledSpec") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ComponentRequestedSpec) :*: S1 (MetaSel (Just "extraConfigArgs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [String]))) :*: ((S1 (MetaSel (Just "installDirTemplates") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 InstallDirTemplates) :*: S1 (MetaSel (Just "compiler") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Compiler)) :*: (S1 (MetaSel (Just "hostPlatform") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Platform) :*: (S1 (MetaSel (Just "buildDir") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 FilePath) :*: S1 (MetaSel (Just "cabalFilePath") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe FilePath)))))) :*: (((S1 (MetaSel (Just "componentGraph") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Graph ComponentLocalBuildInfo)) :*: S1 (MetaSel (Just "componentNameMap") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Map ComponentName [ComponentLocalBuildInfo]))) :*: (S1 (MetaSel (Just "installedPkgs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 InstalledPackageIndex) :*: S1 (MetaSel (Just "pkgDescrFile") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe FilePath)))) :*: ((S1 (MetaSel (Just "localPkgDescr") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 PackageDescription) :*: S1 (MetaSel (Just "withPrograms") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ProgramDb)) :*: (S1 (MetaSel (Just "withPackageDB") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 PackageDBStack) :*: (S1 (MetaSel (Just "withVanillaLib") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Bool) :*: S1 (MetaSel (Just "withProfLib") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Bool)))))) :*: ((((S1 (MetaSel (Just "withSharedLib") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Bool) :*: S1 (MetaSel (Just "withStaticLib") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Bool)) :*: (S1 (MetaSel (Just "withDynExe") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Bool) :*: S1 (MetaSel (Just "withFullyStaticExe") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Bool))) :*: ((S1 (MetaSel (Just "withProfExe") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Bool) :*: S1 (MetaSel (Just "withProfLibDetail") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ProfDetailLevel)) :*: (S1 (MetaSel (Just "withProfExeDetail") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ProfDetailLevel) :*: (S1 (MetaSel (Just "withOptimization") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 OptimisationLevel) :*: S1 (MetaSel (Just "withDebugInfo") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 DebugInfoLevel))))) :*: (((S1 (MetaSel (Just "withGHCiLib") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Bool) :*: S1 (MetaSel (Just "splitSections") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Bool)) :*: (S1 (MetaSel (Just "splitObjs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Bool) :*: (S1 (MetaSel (Just "stripExes") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Bool) :*: S1 (MetaSel (Just "stripLibs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Bool)))) :*: ((S1 (MetaSel (Just "exeCoverage") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Bool) :*: S1 (MetaSel (Just "libCoverage") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Bool)) :*: (S1 (MetaSel (Just "progPrefix") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 PathTemplate) :*: (S1 (MetaSel (Just "progSuffix") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 PathTemplate) :*: S1 (MetaSel (Just "relocatable") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Bool))))))))

Convenience accessors

localComponentId :: LocalBuildInfo -> ComponentId #

Extract the ComponentId from the public library component of a LocalBuildInfo if it exists, or make a fake component ID based on the package ID.

localUnitId :: LocalBuildInfo -> UnitId #

Extract the UnitId from the library component of a LocalBuildInfo if it exists, or make a fake unit ID based on the package ID.

localCompatPackageKey :: LocalBuildInfo -> String #

Extract the compatibility package key from the public library component of a LocalBuildInfo if it exists, or make a fake package key based on the package ID.

Build targets of the LocalBuildInfo.

componentNameCLBIs :: LocalBuildInfo -> ComponentName -> [ComponentLocalBuildInfo] #

Return all ComponentLocalBuildInfos associated with ComponentName. In the presence of Backpack there may be more than one!

componentNameTargets' :: PackageDescription -> LocalBuildInfo -> ComponentName -> [TargetInfo] #

Return all TargetInfos associated with ComponentName. In the presence of Backpack there may be more than one! Has a prime because it takes a PackageDescription argument which may disagree with localPkgDescr in LocalBuildInfo.

allTargetsInBuildOrder' :: PackageDescription -> LocalBuildInfo -> [TargetInfo] #

Return the list of default TargetInfos associated with a configured package, in the order they need to be built. Has a prime because it takes a PackageDescription argument which may disagree with localPkgDescr in LocalBuildInfo.

withAllTargetsInBuildOrder' :: PackageDescription -> LocalBuildInfo -> (TargetInfo -> IO ()) -> IO () #

Execute f for every TargetInfo in the package, respecting the build dependency order. (TODO: We should use Shake!) Has a prime because it takes a PackageDescription argument which may disagree with localPkgDescr in LocalBuildInfo.

neededTargetsInBuildOrder' :: PackageDescription -> LocalBuildInfo -> [UnitId] -> [TargetInfo] #

Return the list of all targets needed to build the uids, in the order they need to be built. Has a prime because it takes a PackageDescription argument which may disagree with localPkgDescr in LocalBuildInfo.

withNeededTargetsInBuildOrder' :: PackageDescription -> LocalBuildInfo -> [UnitId] -> (TargetInfo -> IO ()) -> IO () #

Execute f for every TargetInfo needed to build uids, respecting the build dependency order. Has a prime because it takes a PackageDescription argument which may disagree with localPkgDescr in LocalBuildInfo.

testCoverage :: LocalBuildInfo -> Bool #

Is coverage enabled for test suites? In practice, this requires library and executable profiling to be enabled.

Functions you SHOULD NOT USE (yet), but are defined here to

componentNameTargets :: LocalBuildInfo -> ComponentName -> [TargetInfo] #

Warning: By using this function, you may be introducing a bug where you retrieve a Component which does not have HookedBuildInfo applied to it. See the documentation for HookedBuildInfo for an explanation of the issue. If you have a PakcageDescription handy (NOT from the LocalBuildInfo), try using the primed version of the function, which takes it as an extra argument.

unitIdTarget :: LocalBuildInfo -> UnitId -> Maybe TargetInfo #

Warning: By using this function, you may be introducing a bug where you retrieve a Component which does not have HookedBuildInfo applied to it. See the documentation for HookedBuildInfo for an explanation of the issue. If you have a PakcageDescription handy (NOT from the LocalBuildInfo), try using the primed version of the function, which takes it as an extra argument.

allTargetsInBuildOrder :: LocalBuildInfo -> [TargetInfo] #

Warning: By using this function, you may be introducing a bug where you retrieve a Component which does not have HookedBuildInfo applied to it. See the documentation for HookedBuildInfo for an explanation of the issue. If you have a PakcageDescription handy (NOT from the LocalBuildInfo), try using the primed version of the function, which takes it as an extra argument.

withAllTargetsInBuildOrder :: LocalBuildInfo -> (TargetInfo -> IO ()) -> IO () #

Warning: By using this function, you may be introducing a bug where you retrieve a Component which does not have HookedBuildInfo applied to it. See the documentation for HookedBuildInfo for an explanation of the issue. If you have a PakcageDescription handy (NOT from the LocalBuildInfo), try using the primed version of the function, which takes it as an extra argument.

neededTargetsInBuildOrder :: LocalBuildInfo -> [UnitId] -> [TargetInfo] #

Warning: By using this function, you may be introducing a bug where you retrieve a Component which does not have HookedBuildInfo applied to it. See the documentation for HookedBuildInfo for an explanation of the issue. If you have a PakcageDescription handy (NOT from the LocalBuildInfo), try using the primed version of the function, which takes it as an extra argument.

withNeededTargetsInBuildOrder :: LocalBuildInfo -> [UnitId] -> (TargetInfo -> IO ()) -> IO () #

Warning: By using this function, you may be introducing a bug where you retrieve a Component which does not have HookedBuildInfo applied to it. See the documentation for HookedBuildInfo for an explanation of the issue. If you have a PakcageDescription handy (NOT from the LocalBuildInfo), try using the primed version of the function, which takes it as an extra argument.