stack-3.7.1: The Haskell Tool Stack
LicenseBSD-3-Clause
Safe HaskellNone
LanguageGHC2021

Stack.BuildPlan

Description

Resolving a build plan for a set of packages in a given Stackage snapshot.

Synopsis

Documentation

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.

Instances

Instances details
Show BuildPlanCheck Source # 
Instance details

Defined in Stack.BuildPlan

checkSnapBuildPlan :: (HasConfig env, HasGHCVariant env) => [ResolvedPath Dir] -> Maybe (Map PackageName (Map FlagName Bool)) -> SnapshotCandidate env -> RIO env BuildPlanCheck Source #

Check a set of GenericPackageDescriptions and a set of flags against a given snapshot. Returns how well the snapshot satisfies the dependencies of the packages.

data DepError Source #

A type representing failures to satisfy packages' dependency constraints.

Constructors

DepError 

Fields

Instances

Instances details
Show DepError Source # 
Instance details

Defined in Stack.BuildPlan

Methods

showsPrec :: Int -> DepError -> ShowS

show :: DepError -> String #

showList :: [DepError] -> ShowS

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 GenericPackageDescriptions.