Safe Haskell | None |
---|---|
Language | Haskell2010 |
Distribution.Client.ProjectPlanning.Types
Description
Types used while planning how to build everything in a project.
Primarily this is the ElaboratedInstallPlan
.
Synopsis
- data SolverInstallPlan
- type ElaboratedInstallPlan = GenericInstallPlan InstalledPackageInfo ElaboratedConfiguredPackage
- normaliseConfiguredPackage :: ElaboratedSharedConfig -> ElaboratedConfiguredPackage -> ElaboratedConfiguredPackage
- data ElaboratedConfiguredPackage = ElaboratedConfiguredPackage {
- elabUnitId :: UnitId
- elabComponentId :: ComponentId
- elabInstantiatedWith :: Map ModuleName Module
- elabLinkedInstantiatedWith :: Map ModuleName OpenModule
- elabIsCanonical :: Bool
- elabPkgSourceId :: PackageId
- elabModuleShape :: ModuleShape
- elabFlagAssignment :: FlagAssignment
- elabFlagDefaults :: FlagAssignment
- elabPkgDescription :: PackageDescription
- elabPkgSourceLocation :: PackageLocation (Maybe FilePath)
- elabPkgSourceHash :: Maybe PackageSourceHash
- elabLocalToProject :: Bool
- elabBuildStyle :: BuildStyle
- elabEnabledSpec :: ComponentRequestedSpec
- elabStanzasAvailable :: OptionalStanzaSet
- elabStanzasRequested :: OptionalStanzaMap (Maybe Bool)
- elabPackageDbs :: [Maybe PackageDB]
- elabSetupPackageDBStack :: PackageDBStack
- elabBuildPackageDBStack :: PackageDBStack
- elabRegisterPackageDBStack :: PackageDBStack
- elabInplaceSetupPackageDBStack :: PackageDBStack
- elabInplaceBuildPackageDBStack :: PackageDBStack
- elabInplaceRegisterPackageDBStack :: PackageDBStack
- elabPkgDescriptionOverride :: Maybe CabalFileText
- elabBuildOptions :: BuildOptions
- elabDumpBuildInfo :: DumpBuildInfo
- elabProgramPaths :: Map String FilePath
- elabProgramArgs :: Map String [String]
- elabProgramPathExtra :: [FilePath]
- elabConfigureScriptArgs :: [String]
- elabExtraLibDirs :: [FilePath]
- elabExtraLibDirsStatic :: [FilePath]
- elabExtraFrameworkDirs :: [FilePath]
- elabExtraIncludeDirs :: [FilePath]
- elabProgPrefix :: Maybe PathTemplate
- elabProgSuffix :: Maybe PathTemplate
- elabInstallDirs :: InstallDirs FilePath
- elabHaddockHoogle :: Bool
- elabHaddockHtml :: Bool
- elabHaddockHtmlLocation :: Maybe String
- elabHaddockForeignLibs :: Bool
- elabHaddockForHackage :: HaddockTarget
- elabHaddockExecutables :: Bool
- elabHaddockTestSuites :: Bool
- elabHaddockBenchmarks :: Bool
- elabHaddockInternal :: Bool
- elabHaddockCss :: Maybe FilePath
- elabHaddockLinkedSource :: Bool
- elabHaddockQuickJump :: Bool
- elabHaddockHscolourCss :: Maybe FilePath
- elabHaddockContents :: Maybe PathTemplate
- elabHaddockIndex :: Maybe PathTemplate
- elabHaddockBaseUrl :: Maybe String
- elabHaddockLib :: Maybe String
- elabHaddockOutputDir :: Maybe FilePath
- elabTestMachineLog :: Maybe PathTemplate
- elabTestHumanLog :: Maybe PathTemplate
- elabTestShowDetails :: Maybe TestShowDetails
- elabTestKeepTix :: Bool
- elabTestWrapper :: Maybe FilePath
- elabTestFailWhenNoTestSuites :: Bool
- elabTestTestOptions :: [PathTemplate]
- elabBenchmarkOptions :: [PathTemplate]
- elabSetupScriptStyle :: SetupScriptStyle
- elabSetupScriptCliVersion :: Version
- elabConfigureTargets :: [ComponentTarget]
- elabBuildTargets :: [ComponentTarget]
- elabTestTargets :: [ComponentTarget]
- elabBenchTargets :: [ComponentTarget]
- elabReplTarget :: [ComponentTarget]
- elabHaddockTargets :: [ComponentTarget]
- elabBuildHaddocks :: Bool
- elabPkgOrComp :: ElaboratedPackageOrComponent
- showElaboratedInstallPlan :: ElaboratedInstallPlan -> String
- elabDistDirParams :: ElaboratedSharedConfig -> ElaboratedConfiguredPackage -> DistDirParams
- elabExeDependencyPaths :: ElaboratedConfiguredPackage -> [FilePath]
- elabLibDependencies :: ElaboratedConfiguredPackage -> [(ConfiguredId, Bool)]
- elabOrderLibDependencies :: ElaboratedConfiguredPackage -> [UnitId]
- elabExeDependencies :: ElaboratedConfiguredPackage -> [ComponentId]
- elabOrderExeDependencies :: ElaboratedConfiguredPackage -> [UnitId]
- elabSetupDependencies :: ElaboratedConfiguredPackage -> [(ConfiguredId, Bool)]
- elabPkgConfigDependencies :: ElaboratedConfiguredPackage -> [(PkgconfigName, Maybe PkgconfigVersion)]
- elabInplaceDependencyBuildCacheFiles :: DistDirLayout -> ElaboratedSharedConfig -> ElaboratedInstallPlan -> ElaboratedConfiguredPackage -> [FilePath]
- elabRequiresRegistration :: ElaboratedConfiguredPackage -> Bool
- dataDirsEnvironmentForPlan :: DistDirLayout -> ElaboratedInstallPlan -> [(String, Maybe FilePath)]
- elabPlanPackageName :: Verbosity -> ElaboratedPlanPackage -> String
- elabConfiguredName :: Verbosity -> ElaboratedConfiguredPackage -> String
- elabComponentName :: ElaboratedConfiguredPackage -> Maybe ComponentName
- data ElaboratedPackageOrComponent
- data ElaboratedComponent = ElaboratedComponent {
- compSolverName :: Component
- compComponentName :: Maybe ComponentName
- compLibDependencies :: [(ConfiguredId, Bool)]
- compLinkedLibDependencies :: [OpenUnitId]
- compExeDependencies :: [ConfiguredId]
- compPkgConfigDependencies :: [(PkgconfigName, Maybe PkgconfigVersion)]
- compExeDependencyPaths :: [(ConfiguredId, FilePath)]
- compOrderLibDependencies :: [UnitId]
- data ElaboratedPackage = ElaboratedPackage {
- pkgInstalledId :: InstalledPackageId
- pkgLibDependencies :: ComponentDeps [(ConfiguredId, Bool)]
- pkgDependsOnSelfLib :: ComponentDeps [()]
- pkgExeDependencies :: ComponentDeps [ConfiguredId]
- pkgExeDependencyPaths :: ComponentDeps [(ConfiguredId, FilePath)]
- pkgPkgConfigDependencies :: [(PkgconfigName, Maybe PkgconfigVersion)]
- pkgStanzasEnabled :: OptionalStanzaSet
- pkgWhyNotPerComponent :: NonEmpty NotPerComponentReason
- pkgOrderDependencies :: ElaboratedPackage -> ComponentDeps [UnitId]
- type ElaboratedPlanPackage = GenericPlanPackage InstalledPackageInfo ElaboratedConfiguredPackage
- data ElaboratedSharedConfig = ElaboratedSharedConfig {}
- type ElaboratedReadyPackage = GenericReadyPackage ElaboratedConfiguredPackage
- data BuildStyle
- data MemoryOrDisk
- isInplaceBuildStyle :: BuildStyle -> Bool
- type CabalFileText = ByteString
- data NotPerComponentReason
- data NotPerComponentBuildType
- whyNotPerComponent :: NotPerComponentReason -> String
- data ComponentTarget = ComponentTarget ComponentName SubComponentTarget
- showComponentTarget :: PackageId -> ComponentTarget -> String
- showTestComponentTarget :: PackageId -> ComponentTarget -> Maybe String
- showBenchComponentTarget :: PackageId -> ComponentTarget -> Maybe String
- data SubComponentTarget
- isSubLibComponentTarget :: ComponentTarget -> Bool
- isForeignLibComponentTarget :: ComponentTarget -> Bool
- isExeComponentTarget :: ComponentTarget -> Bool
- isTestComponentTarget :: ComponentTarget -> Bool
- isBenchComponentTarget :: ComponentTarget -> Bool
- componentOptionalStanza :: Component -> Maybe OptionalStanza
- data SetupScriptStyle
Documentation
data SolverInstallPlan #
Instances
Structured SolverInstallPlan # | |||||
Defined in Distribution.Client.SolverInstallPlan Methods structure :: Proxy SolverInstallPlan -> Structure # structureHash' :: Tagged SolverInstallPlan MD5 | |||||
Binary SolverInstallPlan # | |||||
Defined in Distribution.Client.SolverInstallPlan Methods put :: SolverInstallPlan -> Put # get :: Get SolverInstallPlan # putList :: [SolverInstallPlan] -> Put # | |||||
Generic SolverInstallPlan # | |||||
Defined in Distribution.Client.SolverInstallPlan Associated Types
Methods from :: SolverInstallPlan -> Rep SolverInstallPlan x # to :: Rep SolverInstallPlan x -> SolverInstallPlan # | |||||
type Rep SolverInstallPlan # | |||||
Defined in Distribution.Client.SolverInstallPlan |
Elaborated install plan types
type ElaboratedInstallPlan = GenericInstallPlan InstalledPackageInfo ElaboratedConfiguredPackage #
The combination of an elaborated install plan plus a
ElaboratedSharedConfig
contains all the details necessary to be able
to execute the plan without having to make further policy decisions.
It does not include dynamic elements such as resources (such as http connections).
normaliseConfiguredPackage :: ElaboratedSharedConfig -> ElaboratedConfiguredPackage -> ElaboratedConfiguredPackage #
data ElaboratedConfiguredPackage #
Constructors
ElaboratedConfiguredPackage | |
Fields
|
Instances
elabExeDependencyPaths :: ElaboratedConfiguredPackage -> [FilePath] #
This returns the paths of all the executables we depend on; we
must add these paths to PATH before invoking the setup script.
(This is usually what you want, not elabExeDependencies
, if you
actually want to build something.)
elabLibDependencies :: ElaboratedConfiguredPackage -> [(ConfiguredId, Bool)] #
The library dependencies (i.e., the libraries we depend on, NOT
the dependencies of the library), NOT including setup dependencies.
These are passed to the Setup
script via --dependency
or --promised-dependency
.
elabOrderLibDependencies :: ElaboratedConfiguredPackage -> [UnitId] #
Like elabOrderDependencies
, but only returns dependencies on
libraries.
elabExeDependencies :: ElaboratedConfiguredPackage -> [ComponentId] #
The executable dependencies (i.e., the executables we depend on); these are the executables we must add to the PATH before we invoke the setup script.
elabOrderExeDependencies :: ElaboratedConfiguredPackage -> [UnitId] #
Like elabOrderDependencies
, but only returns dependencies on
executables. (This coincides with elabExeDependencies
.)
elabSetupDependencies :: ElaboratedConfiguredPackage -> [(ConfiguredId, Bool)] #
The setup dependencies (the library dependencies of the setup executable; note that it is not legal for setup scripts to have executable dependencies at the moment.)
elabPkgConfigDependencies :: ElaboratedConfiguredPackage -> [(PkgconfigName, Maybe PkgconfigVersion)] #
elabInplaceDependencyBuildCacheFiles :: DistDirLayout -> ElaboratedSharedConfig -> ElaboratedInstallPlan -> ElaboratedConfiguredPackage -> [FilePath] #
The cache files of all our inplace dependencies which, when updated, require us to rebuild. See #4202 for more details. Essentially, this is a list of filepaths that, if our dependencies get rebuilt, will themselves get updated.
Note: the hash of these cache files gets built into the build cache ourselves, which means that we end up tracking transitive dependencies!
Note: This tracks the "build" cache file, but not "registration" or "config" cache files. Why not? Arguably we should...
Note: This is a bit of a hack, because it is not really the hashes of the SOURCES of our (transitive) dependencies that we should use to decide whether or not to rebuild, but the output BUILD PRODUCTS. The strategy we use here will never work if we want to implement unchanging rebuilds.
elabRequiresRegistration :: ElaboratedConfiguredPackage -> Bool #
The packagecomponent containsis a library and so must be registered
dataDirsEnvironmentForPlan :: DistDirLayout -> ElaboratedInstallPlan -> [(String, Maybe FilePath)] #
Construct the environment needed for the data files to work.
This consists of a separate *_datadir
variable for each
inplace package in the plan.
elabPlanPackageName :: Verbosity -> ElaboratedPlanPackage -> String #
User-friendly display string for an ElaboratedPlanPackage
.
elabConfiguredName :: Verbosity -> ElaboratedConfiguredPackage -> String #
A user-friendly descriptor for an ElaboratedConfiguredPackage
.
data ElaboratedPackageOrComponent #
Constructors
ElabPackage ElaboratedPackage | |
ElabComponent ElaboratedComponent |
Instances
Structured ElaboratedPackageOrComponent # | |||||
Defined in Distribution.Client.ProjectPlanning.Types Methods structure :: Proxy ElaboratedPackageOrComponent -> Structure # structureHash' :: Tagged ElaboratedPackageOrComponent MD5 | |||||
Binary ElaboratedPackageOrComponent # | |||||
Defined in Distribution.Client.ProjectPlanning.Types Methods put :: ElaboratedPackageOrComponent -> Put # get :: Get ElaboratedPackageOrComponent # putList :: [ElaboratedPackageOrComponent] -> Put # | |||||
Generic ElaboratedPackageOrComponent # | |||||
Defined in Distribution.Client.ProjectPlanning.Types Associated Types
| |||||
Show ElaboratedPackageOrComponent # | |||||
Defined in Distribution.Client.ProjectPlanning.Types Methods showsPrec :: Int -> ElaboratedPackageOrComponent -> ShowS # show :: ElaboratedPackageOrComponent -> String # showList :: [ElaboratedPackageOrComponent] -> ShowS # | |||||
Eq ElaboratedPackageOrComponent # | |||||
Defined in Distribution.Client.ProjectPlanning.Types Methods (==) :: ElaboratedPackageOrComponent -> ElaboratedPackageOrComponent -> Bool # (/=) :: ElaboratedPackageOrComponent -> ElaboratedPackageOrComponent -> Bool # | |||||
type Rep ElaboratedPackageOrComponent # | |||||
Defined in Distribution.Client.ProjectPlanning.Types type Rep ElaboratedPackageOrComponent = D1 ('MetaData "ElaboratedPackageOrComponent" "Distribution.Client.ProjectPlanning.Types" "cabal-install-3.12.1.0-G554PkJj2SpDqyarXp9tbt" 'False) (C1 ('MetaCons "ElabPackage" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ElaboratedPackage)) :+: C1 ('MetaCons "ElabComponent" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ElaboratedComponent))) |
data ElaboratedComponent #
Some extra metadata associated with an
ElaboratedConfiguredPackage
which indicates that the "package"
in question is actually a single component to be built. Arguably
it would be clearer if there were an ADT which branched into
package work items and component work items, but I've structured
it this way to minimize change to the existing code (which I
don't feel qualified to rewrite.)
Constructors
ElaboratedComponent | |
Fields
|
Instances
Structured ElaboratedComponent # | |||||
Defined in Distribution.Client.ProjectPlanning.Types Methods structure :: Proxy ElaboratedComponent -> Structure # structureHash' :: Tagged ElaboratedComponent MD5 | |||||
Binary ElaboratedComponent # | |||||
Defined in Distribution.Client.ProjectPlanning.Types Methods put :: ElaboratedComponent -> Put # get :: Get ElaboratedComponent # putList :: [ElaboratedComponent] -> Put # | |||||
Generic ElaboratedComponent # | |||||
Defined in Distribution.Client.ProjectPlanning.Types Associated Types
Methods from :: ElaboratedComponent -> Rep ElaboratedComponent x # to :: Rep ElaboratedComponent x -> ElaboratedComponent # | |||||
Show ElaboratedComponent # | |||||
Defined in Distribution.Client.ProjectPlanning.Types Methods showsPrec :: Int -> ElaboratedComponent -> ShowS # show :: ElaboratedComponent -> String # showList :: [ElaboratedComponent] -> ShowS # | |||||
Eq ElaboratedComponent # | |||||
Defined in Distribution.Client.ProjectPlanning.Types Methods (==) :: ElaboratedComponent -> ElaboratedComponent -> Bool # (/=) :: ElaboratedComponent -> ElaboratedComponent -> Bool # | |||||
type Rep ElaboratedComponent # | |||||
Defined in Distribution.Client.ProjectPlanning.Types type Rep ElaboratedComponent = D1 ('MetaData "ElaboratedComponent" "Distribution.Client.ProjectPlanning.Types" "cabal-install-3.12.1.0-G554PkJj2SpDqyarXp9tbt" 'False) (C1 ('MetaCons "ElaboratedComponent" 'PrefixI 'True) (((S1 ('MetaSel ('Just "compSolverName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Component) :*: S1 ('MetaSel ('Just "compComponentName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ComponentName))) :*: (S1 ('MetaSel ('Just "compLibDependencies") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(ConfiguredId, Bool)]) :*: S1 ('MetaSel ('Just "compLinkedLibDependencies") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [OpenUnitId]))) :*: ((S1 ('MetaSel ('Just "compExeDependencies") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ConfiguredId]) :*: S1 ('MetaSel ('Just "compPkgConfigDependencies") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(PkgconfigName, Maybe PkgconfigVersion)])) :*: (S1 ('MetaSel ('Just "compExeDependencyPaths") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(ConfiguredId, FilePath)]) :*: S1 ('MetaSel ('Just "compOrderLibDependencies") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [UnitId]))))) |
data ElaboratedPackage #
Constructors
ElaboratedPackage | |
Fields
|
Instances
Structured ElaboratedPackage # | |||||
Defined in Distribution.Client.ProjectPlanning.Types Methods structure :: Proxy ElaboratedPackage -> Structure # structureHash' :: Tagged ElaboratedPackage MD5 | |||||
Binary ElaboratedPackage # | |||||
Defined in Distribution.Client.ProjectPlanning.Types Methods put :: ElaboratedPackage -> Put # get :: Get ElaboratedPackage # putList :: [ElaboratedPackage] -> Put # | |||||
Generic ElaboratedPackage # | |||||
Defined in Distribution.Client.ProjectPlanning.Types Associated Types
Methods from :: ElaboratedPackage -> Rep ElaboratedPackage x # to :: Rep ElaboratedPackage x -> ElaboratedPackage # | |||||
Show ElaboratedPackage # | |||||
Defined in Distribution.Client.ProjectPlanning.Types Methods showsPrec :: Int -> ElaboratedPackage -> ShowS # show :: ElaboratedPackage -> String # showList :: [ElaboratedPackage] -> ShowS # | |||||
Eq ElaboratedPackage # | |||||
Defined in Distribution.Client.ProjectPlanning.Types Methods (==) :: ElaboratedPackage -> ElaboratedPackage -> Bool # (/=) :: ElaboratedPackage -> ElaboratedPackage -> Bool # | |||||
type Rep ElaboratedPackage # | |||||
Defined in Distribution.Client.ProjectPlanning.Types type Rep ElaboratedPackage = D1 ('MetaData "ElaboratedPackage" "Distribution.Client.ProjectPlanning.Types" "cabal-install-3.12.1.0-G554PkJj2SpDqyarXp9tbt" 'False) (C1 ('MetaCons "ElaboratedPackage" 'PrefixI 'True) (((S1 ('MetaSel ('Just "pkgInstalledId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 InstalledPackageId) :*: S1 ('MetaSel ('Just "pkgLibDependencies") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ComponentDeps [(ConfiguredId, Bool)]))) :*: (S1 ('MetaSel ('Just "pkgDependsOnSelfLib") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ComponentDeps [()])) :*: S1 ('MetaSel ('Just "pkgExeDependencies") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ComponentDeps [ConfiguredId])))) :*: ((S1 ('MetaSel ('Just "pkgExeDependencyPaths") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ComponentDeps [(ConfiguredId, FilePath)])) :*: S1 ('MetaSel ('Just "pkgPkgConfigDependencies") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(PkgconfigName, Maybe PkgconfigVersion)])) :*: (S1 ('MetaSel ('Just "pkgStanzasEnabled") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 OptionalStanzaSet) :*: S1 ('MetaSel ('Just "pkgWhyNotPerComponent") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty NotPerComponentReason)))))) |
pkgOrderDependencies :: ElaboratedPackage -> ComponentDeps [UnitId] #
See elabOrderDependencies
. This gives the unflattened version,
which can be useful in some circumstances.
data ElaboratedSharedConfig #
Constructors
ElaboratedSharedConfig | |
Fields
|
Instances
data BuildStyle #
This is used in the install plan to indicate how the package will be built.
Constructors
BuildAndInstall | The classic approach where the package is built, then the files installed into some location and the result registered in a package db. If the package came from a tarball then it's built in a temp dir and the results discarded. |
BuildInplaceOnly MemoryOrDisk | For Such packages can still subsequently be installed. Typically For At the moment We use single constructor |
Instances
Structured BuildStyle # | |||||
Defined in Distribution.Client.ProjectPlanning.Types | |||||
Binary BuildStyle # | |||||
Defined in Distribution.Client.ProjectPlanning.Types | |||||
Monoid BuildStyle # | |||||
Defined in Distribution.Client.ProjectPlanning.Types Methods mempty :: BuildStyle # mappend :: BuildStyle -> BuildStyle -> BuildStyle # mconcat :: [BuildStyle] -> BuildStyle # | |||||
Semigroup BuildStyle # | |||||
Defined in Distribution.Client.ProjectPlanning.Types Methods (<>) :: BuildStyle -> BuildStyle -> BuildStyle # sconcat :: NonEmpty BuildStyle -> BuildStyle # stimes :: Integral b => b -> BuildStyle -> BuildStyle # | |||||
Generic BuildStyle # | |||||
Defined in Distribution.Client.ProjectPlanning.Types Associated Types
| |||||
Show BuildStyle # | |||||
Defined in Distribution.Client.ProjectPlanning.Types Methods showsPrec :: Int -> BuildStyle -> ShowS # show :: BuildStyle -> String # showList :: [BuildStyle] -> ShowS # | |||||
Eq BuildStyle # | |||||
Defined in Distribution.Client.ProjectPlanning.Types | |||||
Ord BuildStyle # | |||||
Defined in Distribution.Client.ProjectPlanning.Types Methods compare :: BuildStyle -> BuildStyle -> Ordering # (<) :: BuildStyle -> BuildStyle -> Bool # (<=) :: BuildStyle -> BuildStyle -> Bool # (>) :: BuildStyle -> BuildStyle -> Bool # (>=) :: BuildStyle -> BuildStyle -> Bool # max :: BuildStyle -> BuildStyle -> BuildStyle # min :: BuildStyle -> BuildStyle -> BuildStyle # | |||||
type Rep BuildStyle # | |||||
Defined in Distribution.Client.ProjectPlanning.Types type Rep BuildStyle = D1 ('MetaData "BuildStyle" "Distribution.Client.ProjectPlanning.Types" "cabal-install-3.12.1.0-G554PkJj2SpDqyarXp9tbt" 'False) (C1 ('MetaCons "BuildAndInstall" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BuildInplaceOnly" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 MemoryOrDisk))) |
data MemoryOrDisk #
How BuildInplaceOnly
component is built.
Instances
Structured MemoryOrDisk # | |||||
Defined in Distribution.Client.ProjectPlanning.Types | |||||
Binary MemoryOrDisk # | |||||
Defined in Distribution.Client.ProjectPlanning.Types | |||||
Generic MemoryOrDisk # | |||||
Defined in Distribution.Client.ProjectPlanning.Types Associated Types
| |||||
Show MemoryOrDisk # | |||||
Defined in Distribution.Client.ProjectPlanning.Types Methods showsPrec :: Int -> MemoryOrDisk -> ShowS # show :: MemoryOrDisk -> String # showList :: [MemoryOrDisk] -> ShowS # | |||||
Eq MemoryOrDisk # | |||||
Defined in Distribution.Client.ProjectPlanning.Types | |||||
Ord MemoryOrDisk # | |||||
Defined in Distribution.Client.ProjectPlanning.Types Methods compare :: MemoryOrDisk -> MemoryOrDisk -> Ordering # (<) :: MemoryOrDisk -> MemoryOrDisk -> Bool # (<=) :: MemoryOrDisk -> MemoryOrDisk -> Bool # (>) :: MemoryOrDisk -> MemoryOrDisk -> Bool # (>=) :: MemoryOrDisk -> MemoryOrDisk -> Bool # max :: MemoryOrDisk -> MemoryOrDisk -> MemoryOrDisk # min :: MemoryOrDisk -> MemoryOrDisk -> MemoryOrDisk # | |||||
type Rep MemoryOrDisk # | |||||
Defined in Distribution.Client.ProjectPlanning.Types |
isInplaceBuildStyle :: BuildStyle -> Bool #
type CabalFileText = ByteString #
data NotPerComponentReason #
Why did we fall-back to a per-package build, instead of using a per-component build?
Constructors
CuzBuildType !NotPerComponentBuildType | The build-type does not support per-component builds. |
CuzCabalSpecVersion | The Cabal spec version is too old for per-component builds. |
CuzNoBuildableComponents | There are no buildable components, so we fall-back to a per-package build for error-reporting purposes. |
CuzDisablePerComponent | The user passed |
Instances
Structured NotPerComponentReason # | |||||
Defined in Distribution.Client.ProjectPlanning.Types Methods structure :: Proxy NotPerComponentReason -> Structure # structureHash' :: Tagged NotPerComponentReason MD5 | |||||
Binary NotPerComponentReason # | |||||
Defined in Distribution.Client.ProjectPlanning.Types Methods put :: NotPerComponentReason -> Put # get :: Get NotPerComponentReason # putList :: [NotPerComponentReason] -> Put # | |||||
Generic NotPerComponentReason # | |||||
Defined in Distribution.Client.ProjectPlanning.Types Associated Types
Methods from :: NotPerComponentReason -> Rep NotPerComponentReason x # to :: Rep NotPerComponentReason x -> NotPerComponentReason # | |||||
Show NotPerComponentReason # | |||||
Defined in Distribution.Client.ProjectPlanning.Types Methods showsPrec :: Int -> NotPerComponentReason -> ShowS # show :: NotPerComponentReason -> String # showList :: [NotPerComponentReason] -> ShowS # | |||||
Eq NotPerComponentReason # | |||||
Defined in Distribution.Client.ProjectPlanning.Types Methods (==) :: NotPerComponentReason -> NotPerComponentReason -> Bool # (/=) :: NotPerComponentReason -> NotPerComponentReason -> Bool # | |||||
type Rep NotPerComponentReason # | |||||
Defined in Distribution.Client.ProjectPlanning.Types type Rep NotPerComponentReason = D1 ('MetaData "NotPerComponentReason" "Distribution.Client.ProjectPlanning.Types" "cabal-install-3.12.1.0-G554PkJj2SpDqyarXp9tbt" 'False) ((C1 ('MetaCons "CuzBuildType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 NotPerComponentBuildType)) :+: C1 ('MetaCons "CuzCabalSpecVersion" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "CuzNoBuildableComponents" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CuzDisablePerComponent" 'PrefixI 'False) (U1 :: Type -> Type))) |
data NotPerComponentBuildType #
Constructors
CuzConfigureBuildType | |
CuzCustomBuildType | |
CuzMakeBuildType |
Instances
Structured NotPerComponentBuildType # | |||||
Defined in Distribution.Client.ProjectPlanning.Types Methods structure :: Proxy NotPerComponentBuildType -> Structure # structureHash' :: Tagged NotPerComponentBuildType MD5 | |||||
Binary NotPerComponentBuildType # | |||||
Defined in Distribution.Client.ProjectPlanning.Types Methods put :: NotPerComponentBuildType -> Put # get :: Get NotPerComponentBuildType # putList :: [NotPerComponentBuildType] -> Put # | |||||
Generic NotPerComponentBuildType # | |||||
Defined in Distribution.Client.ProjectPlanning.Types Associated Types
Methods from :: NotPerComponentBuildType -> Rep NotPerComponentBuildType x # to :: Rep NotPerComponentBuildType x -> NotPerComponentBuildType # | |||||
Show NotPerComponentBuildType # | |||||
Defined in Distribution.Client.ProjectPlanning.Types Methods showsPrec :: Int -> NotPerComponentBuildType -> ShowS # show :: NotPerComponentBuildType -> String # showList :: [NotPerComponentBuildType] -> ShowS # | |||||
Eq NotPerComponentBuildType # | |||||
Defined in Distribution.Client.ProjectPlanning.Types Methods (==) :: NotPerComponentBuildType -> NotPerComponentBuildType -> Bool # (/=) :: NotPerComponentBuildType -> NotPerComponentBuildType -> Bool # | |||||
type Rep NotPerComponentBuildType # | |||||
Defined in Distribution.Client.ProjectPlanning.Types type Rep NotPerComponentBuildType = D1 ('MetaData "NotPerComponentBuildType" "Distribution.Client.ProjectPlanning.Types" "cabal-install-3.12.1.0-G554PkJj2SpDqyarXp9tbt" 'False) (C1 ('MetaCons "CuzConfigureBuildType" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "CuzCustomBuildType" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CuzMakeBuildType" 'PrefixI 'False) (U1 :: Type -> Type))) |
whyNotPerComponent :: NotPerComponentReason -> String #
Display the reason we had to fall-back to a per-package build instead of a per-component build.
Build targets
data ComponentTarget #
Specific targets within a package or component to act on e.g. to build, haddock or open a repl.
Constructors
ComponentTarget ComponentName SubComponentTarget |
Instances
Structured ComponentTarget # | |||||
Defined in Distribution.Client.ProjectPlanning.Types Methods structure :: Proxy ComponentTarget -> Structure # structureHash' :: Tagged ComponentTarget MD5 | |||||
Binary ComponentTarget # | |||||
Defined in Distribution.Client.ProjectPlanning.Types Methods put :: ComponentTarget -> Put # get :: Get ComponentTarget # putList :: [ComponentTarget] -> Put # | |||||
Generic ComponentTarget # | |||||
Defined in Distribution.Client.ProjectPlanning.Types Associated Types
Methods from :: ComponentTarget -> Rep ComponentTarget x # to :: Rep ComponentTarget x -> ComponentTarget # | |||||
Show ComponentTarget # | |||||
Defined in Distribution.Client.ProjectPlanning.Types Methods showsPrec :: Int -> ComponentTarget -> ShowS # show :: ComponentTarget -> String # showList :: [ComponentTarget] -> ShowS # | |||||
Eq ComponentTarget # | |||||
Defined in Distribution.Client.ProjectPlanning.Types Methods (==) :: ComponentTarget -> ComponentTarget -> Bool # (/=) :: ComponentTarget -> ComponentTarget -> Bool # | |||||
Ord ComponentTarget # | |||||
Defined in Distribution.Client.ProjectPlanning.Types Methods compare :: ComponentTarget -> ComponentTarget -> Ordering # (<) :: ComponentTarget -> ComponentTarget -> Bool # (<=) :: ComponentTarget -> ComponentTarget -> Bool # (>) :: ComponentTarget -> ComponentTarget -> Bool # (>=) :: ComponentTarget -> ComponentTarget -> Bool # max :: ComponentTarget -> ComponentTarget -> ComponentTarget # min :: ComponentTarget -> ComponentTarget -> ComponentTarget # | |||||
type Rep ComponentTarget # | |||||
Defined in Distribution.Client.ProjectPlanning.Types type Rep ComponentTarget = D1 ('MetaData "ComponentTarget" "Distribution.Client.ProjectPlanning.Types" "cabal-install-3.12.1.0-G554PkJj2SpDqyarXp9tbt" 'False) (C1 ('MetaCons "ComponentTarget" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ComponentName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SubComponentTarget))) |
showComponentTarget :: PackageId -> ComponentTarget -> String #
Unambiguously render a ComponentTarget
, e.g., to pass
to a Cabal Setup script.
data SubComponentTarget #
Either the component as a whole or detail about a file or module target within a component.
Constructors
WholeComponent | The component as a whole |
ModuleTarget ModuleName | A specific module within a component. |
FileTarget FilePath | A specific file within a component. Note that this does not carry the file extension. |
Instances
Structured SubComponentTarget # | |||||
Defined in Distribution.Client.TargetSelector Methods structure :: Proxy SubComponentTarget -> Structure # structureHash' :: Tagged SubComponentTarget MD5 | |||||
Binary SubComponentTarget # | |||||
Defined in Distribution.Client.TargetSelector Methods put :: SubComponentTarget -> Put # get :: Get SubComponentTarget # putList :: [SubComponentTarget] -> Put # | |||||
Generic SubComponentTarget # | |||||
Defined in Distribution.Client.TargetSelector Associated Types
Methods from :: SubComponentTarget -> Rep SubComponentTarget x # to :: Rep SubComponentTarget x -> SubComponentTarget # | |||||
Show SubComponentTarget # | |||||
Defined in Distribution.Client.TargetSelector Methods showsPrec :: Int -> SubComponentTarget -> ShowS # show :: SubComponentTarget -> String # showList :: [SubComponentTarget] -> ShowS # | |||||
Eq SubComponentTarget # | |||||
Defined in Distribution.Client.TargetSelector Methods (==) :: SubComponentTarget -> SubComponentTarget -> Bool # (/=) :: SubComponentTarget -> SubComponentTarget -> Bool # | |||||
Ord SubComponentTarget # | |||||
Defined in Distribution.Client.TargetSelector Methods compare :: SubComponentTarget -> SubComponentTarget -> Ordering # (<) :: SubComponentTarget -> SubComponentTarget -> Bool # (<=) :: SubComponentTarget -> SubComponentTarget -> Bool # (>) :: SubComponentTarget -> SubComponentTarget -> Bool # (>=) :: SubComponentTarget -> SubComponentTarget -> Bool # max :: SubComponentTarget -> SubComponentTarget -> SubComponentTarget # min :: SubComponentTarget -> SubComponentTarget -> SubComponentTarget # | |||||
type Rep SubComponentTarget # | |||||
Defined in Distribution.Client.TargetSelector type Rep SubComponentTarget = D1 ('MetaData "SubComponentTarget" "Distribution.Client.TargetSelector" "cabal-install-3.12.1.0-G554PkJj2SpDqyarXp9tbt" 'False) (C1 ('MetaCons "WholeComponent" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ModuleTarget" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ModuleName)) :+: C1 ('MetaCons "FileTarget" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath)))) |
Setup script
data SetupScriptStyle #
There are four major cases for Setup.hs handling:
build-type
Custom with acustom-setup
sectionbuild-type
Custom without acustom-setup
sectionbuild-type
not Custom withcabal-version > $our-cabal-version
build-type
not Custom withcabal-version <= $our-cabal-version
It's also worth noting that packages specifying cabal-version: >= 1.23
or later that have build-type
Custom will always have a custom-setup
section. Therefore in case 2, the specified cabal-version
will always be
less than 1.23.
In cases 1 and 2 we obviously have to build an external Setup.hs script, while in case 4 we can use the internal library API. In case 3 we also have to build an external Setup.hs script because the package needs a later Cabal lib version than we can support internally.
Constructors
SetupCustomExplicitDeps | |
SetupCustomImplicitDeps | |
SetupNonCustomExternalLib | |
SetupNonCustomInternalLib |
Instances
Structured SetupScriptStyle # | |||||
Defined in Distribution.Client.ProjectPlanning.Types Methods structure :: Proxy SetupScriptStyle -> Structure # structureHash' :: Tagged SetupScriptStyle MD5 | |||||
Binary SetupScriptStyle # | |||||
Defined in Distribution.Client.ProjectPlanning.Types Methods put :: SetupScriptStyle -> Put # get :: Get SetupScriptStyle # putList :: [SetupScriptStyle] -> Put # | |||||
Generic SetupScriptStyle # | |||||
Defined in Distribution.Client.ProjectPlanning.Types Associated Types
Methods from :: SetupScriptStyle -> Rep SetupScriptStyle x # to :: Rep SetupScriptStyle x -> SetupScriptStyle # | |||||
Show SetupScriptStyle # | |||||
Defined in Distribution.Client.ProjectPlanning.Types Methods showsPrec :: Int -> SetupScriptStyle -> ShowS # show :: SetupScriptStyle -> String # showList :: [SetupScriptStyle] -> ShowS # | |||||
Eq SetupScriptStyle # | |||||
Defined in Distribution.Client.ProjectPlanning.Types Methods (==) :: SetupScriptStyle -> SetupScriptStyle -> Bool # (/=) :: SetupScriptStyle -> SetupScriptStyle -> Bool # | |||||
type Rep SetupScriptStyle # | |||||
Defined in Distribution.Client.ProjectPlanning.Types type Rep SetupScriptStyle = D1 ('MetaData "SetupScriptStyle" "Distribution.Client.ProjectPlanning.Types" "cabal-install-3.12.1.0-G554PkJj2SpDqyarXp9tbt" 'False) ((C1 ('MetaCons "SetupCustomExplicitDeps" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SetupCustomImplicitDeps" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "SetupNonCustomExternalLib" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SetupNonCustomInternalLib" 'PrefixI 'False) (U1 :: Type -> Type))) |