stack-1.0.2: The Haskell Tool Stack

Safe HaskellNone
LanguageHaskell2010

Stack.Solver

Synopsis

Documentation

checkResolverSpec :: (MonadIO m, MonadCatch m, MonadLogger m, MonadReader env m, HasHttpManager env, HasConfig env, HasGHCVariant env, MonadBaseControl IO m) => [GenericPackageDescription] -> Maybe (Map PackageName (Map FlagName Bool)) -> Resolver -> m BuildPlanCheck Source

Given a bundle of packages and a resolver, check the resolver with respect to the packages and return how well the resolver satisfies the depndencies of the packages. If flags is passed as Nothing then flags are chosen automatically.

cabalPackagesCheck :: (MonadBaseControl IO m, MonadIO m, MonadLogger m, MonadMask m, MonadReader env m, HasConfig env, HasGHCVariant env, HasHttpManager env, HasLogLevel env, HasReExec env, HasTerminal env) => [Path Abs File] -> String -> String -> m [GenericPackageDescription] Source

Do some basic checks on a list of cabal file paths to be used for creating stack config, print some informative and error messages and if all is ok return GenericPackageDescription list.

solveExtraDeps Source

Arguments

:: (MonadBaseControl IO m, MonadIO m, MonadLogger m, MonadMask m, MonadReader env m, HasConfig env, HasEnvConfig env, HasGHCVariant env, HasHttpManager env, HasLogLevel env, HasReExec env, HasTerminal env) 
=> Bool

modify stack.yaml?

-> m () 

Solver can be thought of as a counterpart of init. init creates a stack.yaml whereas solver verifies or fixes an existing one. It can verify the dependencies of the packages and determine if any extra-dependecies outside the snapshots are needed.

TODO Currently solver uses a stack.yaml in the parent chain when there is no stack.yaml in the current directory. It should instead look for a stack yaml only in the current directory and suggest init if there is none available. That will make the behavior consistent with init and provide a correct meaning to a --ignore-subdirs option if implemented.

solveResolverSpec Source

Arguments

:: (MonadBaseControl IO m, MonadIO m, MonadLogger m, MonadMask m, MonadReader env m, HasConfig env, HasGHCVariant env, HasHttpManager env, HasLogLevel env, HasReExec env, HasTerminal env) 
=> Path Abs File

stack.yaml file location

-> [Path Abs Dir]

package dirs containing cabal files

-> (Resolver, ConstraintSpec, ConstraintSpec)

( resolver , src package constraints , extra dependency constraints )

-> m (Maybe (ConstraintSpec, ConstraintSpec))

( resulting src package specs , resulting external package specs )