Cabal-2.0.0.2: A framework for packaging Haskell software

Safe HaskellNone
LanguageHaskell2010

Distribution.Types.LocalBuildInfo

Contents

Synopsis

The type

data LocalBuildInfo Source #

Data cached after configuration step. See also ConfigFlags.

Constructors

LocalBuildInfo 

Fields

Instances

Read LocalBuildInfo Source # 
Show LocalBuildInfo Source # 
Generic LocalBuildInfo Source # 

Associated Types

type Rep LocalBuildInfo :: * -> * #

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

Convenience accessors

localComponentId :: LocalBuildInfo -> ComponentId Source #

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 Source #

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 Source #

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] Source #

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

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

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] Source #

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 () Source #

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] Source #

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 () Source #

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 Source #

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] Source #

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 Source #

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] Source #

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 () Source #

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] Source #

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 () Source #

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.

Backwards compatibility.

componentsConfigs :: LocalBuildInfo -> [(ComponentName, ComponentLocalBuildInfo, [ComponentName])] Source #

Deprecated: Use componentGraph instead; you can get a list of ComponentLocalBuildInfo with toList. There's not a good way to get the list of ComponentNames the ComponentLocalBuildInfo depends on because this query doesn't make sense; the graph is indexed by UnitId not ComponentName. Given a UnitId you can lookup the ComponentLocalBuildInfo (getCLBI) and then get the ComponentName ('componentLocalName]). To be removed in Cabal 2.2

externalPackageDeps :: LocalBuildInfo -> [(UnitId, MungedPackageId)] Source #

Deprecated: You almost certainly don't want this function, which agglomerates the dependencies of ALL enabled components. If you're using this to write out information on your dependencies, read off the dependencies directly from the actual component in question. To be removed in Cabal 2.2

External package dependencies for the package as a whole. This is the union of the individual componentPackageDeps, less any internal deps.