This type corresponds directly to what can be written in the
cabal.project file. Other sources of configuration can also be injected
into this type, such as the user-wide config file and the
command line of cabal configure or cabal build.
Since it corresponds to the external project file it is an instance of Monoid and all the fields can be empty. This also means there has to be a step where we resolve configuration. At a minimum resolving means applying defaults but it can also mean merging information from multiple sources. For example for package-specific configuration the project file can specify configuration that applies to all local packages, and then additional configuration for a specific package.
Future directions: multiple profiles, conditionals. If we add these features then the gap between configuration as written in the config file and resolved settings we actually use will become even bigger.
Constructors
ProjectConfigprojectPackages :: [String]Packages in this project, including local dirs, local .cabal files local and remote tarballs. When these are file globs, they must match at least one package.
projectPackagesOptional :: [String]Like
projectConfigPackageGlobsbut optional in the sense that file globs are allowed to match nothing. The primary use case for this is to be able to sayoptional-packages: */to automagically pick up deps that we unpack locally without erroring when there aren't any.projectPackagesRepo :: [SourceRepoList]Packages in this project from remote source repositories.
projectPackagesNamed :: [PackageVersionConstraint]Packages in this project from hackage repositories.
projectConfigBuildOnly :: ProjectConfigBuildOnlyprojectConfigProvenance :: Set ProjectConfigProvenanceprojectConfigAllPackages :: PackageConfigConfiguration to be applied to *all* packages, whether named in
cabal.projector not.projectConfigLocalPackages :: PackageConfigConfiguration to be applied to *local* packages; i.e., any packages which are explicitly named in
cabal.project.projectConfigSpecificPackage :: MapMappend PackageName PackageConfig
Instances8Eq, Show, Generic, Semigroup, Monoid, Binary, …
Eq ProjectConfigDefined in cabal-install-3.12.1.0 · Distribution.Client.ProjectConfig.TypesShow ProjectConfigDefined in cabal-install-3.12.1.0 · Distribution.Client.ProjectConfig.TypesGeneric ProjectConfigDefined in cabal-install-3.12.1.0 · Distribution.Client.ProjectConfig.TypesSemigroup ProjectConfigDefined in cabal-install-3.12.1.0 · Distribution.Client.ProjectConfig.TypesMonoid ProjectConfigDefined in cabal-install-3.12.1.0 · Distribution.Client.ProjectConfig.TypesBinary ProjectConfigDefined in cabal-install-3.12.1.0 · Distribution.Client.ProjectConfig.TypesStructured ProjectConfigDefined in cabal-install-3.12.1.0 · Distribution.Client.ProjectConfig.Typestype Rep ProjectConfig = D1 ('MetaDataDefined in cabal-install-3.12.1.0 · Distribution.Client.ProjectConfig.Types"ProjectConfig"
"Distribution.Client.ProjectConfig.Types"
"cabal-install-3.12.1.0-1D90DH9PPem9Tqn79I9vRN"
'False) (C1 ('MetaCons"ProjectConfig"
'PrefixI 'True) (((S1 ('MetaSel ('Just"projectPackages"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [String]) :*: S1 ('MetaSel ('Just"projectPackagesOptional"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [String])) :*: (S1 ('MetaSel ('Just"projectPackagesRepo"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [SourceRepoList]) :*: (S1 ('MetaSel ('Just"projectPackagesNamed"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [PackageVersionConstraint]) :*: S1 ('MetaSel ('Just"projectConfigBuildOnly"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ProjectConfigBuildOnly)))) :*: ((S1 ('MetaSel ('Just"projectConfigShared"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ProjectConfigShared) :*: S1 ('MetaSel ('Just"projectConfigProvenance"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Set ProjectConfigProvenance))) :*: (S1 ('MetaSel ('Just"projectConfigAllPackages"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PackageConfig) :*: (S1 ('MetaSel ('Just"projectConfigLocalPackages"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PackageConfig) :*: S1 ('MetaSel ('Just"projectConfigSpecificPackage"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (MapMappend PackageName PackageConfig)))))))