License | BSD-3-Clause |
---|---|
Safe Haskell | None |
Language | GHC2021 |
Stack.BuildPlan
Description
Resolving a build plan for a set of packages in a given Stackage snapshot.
Synopsis
- data BuildPlanException
- data BuildPlanCheck
- checkSnapBuildPlan :: (HasConfig env, HasGHCVariant env) => [ResolvedPath Dir] -> Maybe (Map PackageName (Map FlagName Bool)) -> SnapshotCandidate env -> RIO env BuildPlanCheck
- data DepError = DepError {
- version :: !(Maybe Version)
- neededBy :: !(Map PackageName VersionRange)
- type DepErrors = Map PackageName DepError
- removeSrcPkgDefaultFlags :: [GenericPackageDescription] -> Map PackageName (Map FlagName Bool) -> Map PackageName (Map FlagName Bool)
- selectBestSnapshot :: (HasConfig env, HasGHCVariant env) => [ResolvedPath Dir] -> NonEmpty SnapName -> RIO env (SnapshotCandidate env, RawSnapshotLocation, BuildPlanCheck)
Documentation
data BuildPlanException Source #
Type representing exceptions thrown by functions exported by the Stack.BuildPlan module.
Constructors
Instances
Exception BuildPlanException Source # | |
Defined in Stack.BuildPlan Methods toException :: BuildPlanException -> SomeException # fromException :: SomeException -> Maybe BuildPlanException # | |
Show BuildPlanException Source # | |
Defined in Stack.BuildPlan Methods showsPrec :: Int -> BuildPlanException -> ShowS show :: BuildPlanException -> String # showList :: [BuildPlanException] -> ShowS |
data BuildPlanCheck Source #
A type representing the results of evaluating how well a snapshot satisfies the dependencies of a set of packages and a set of Cabal flags.
Constructors
Instances
Show BuildPlanCheck Source # | |
Defined in Stack.BuildPlan Methods showsPrec :: Int -> BuildPlanCheck -> ShowS show :: BuildPlanCheck -> String # showList :: [BuildPlanCheck] -> ShowS |
checkSnapBuildPlan :: (HasConfig env, HasGHCVariant env) => [ResolvedPath Dir] -> Maybe (Map PackageName (Map FlagName Bool)) -> SnapshotCandidate env -> RIO env BuildPlanCheck Source #
Check a set of GenericPackageDescription
s and a set of flags against a
given snapshot. Returns how well the snapshot satisfies the dependencies of
the packages.
A type representing failures to satisfy packages' dependency constraints.
Constructors
DepError | |
Fields
|
type DepErrors = Map PackageName DepError Source #
A type synoynm for a dictionary of packages and failures to satisfy packages' dependency constraints.
removeSrcPkgDefaultFlags :: [GenericPackageDescription] -> Map PackageName (Map FlagName Bool) -> Map PackageName (Map FlagName Bool) Source #
For the given list of packages and dictionary of packages and Cabal flags, remove flags that have defaults and packages with no remaining flags.
selectBestSnapshot :: (HasConfig env, HasGHCVariant env) => [ResolvedPath Dir] -> NonEmpty SnapName -> RIO env (SnapshotCandidate env, RawSnapshotLocation, BuildPlanCheck) Source #
Find a snapshot and set of flags that is compatible with and matches as
best as possible with the given GenericPackageDescription
s.