stack- The Haskell Tool Stack

Safe HaskellNone



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



data MiniBuildPlan Source

A simplified version of the BuildPlan + cabal file.


data MiniPackageInfo Source

Information on a single package for the MiniBuildPlan.




data Snapshots Source

Most recent Nightly and newest LTS version per major release.



getSnapshots :: (MonadThrow m, MonadIO m, MonadReader env m, HasHttpManager env, HasStackRoot env, HasConfig env) => m Snapshots Source

Download the Snapshots value from

resolveBuildPlan Source


:: (MonadThrow m, MonadIO m, MonadReader env m, HasBuildConfig env, MonadLogger m, HasHttpManager env, MonadBaseControl IO m, MonadCatch m) 
=> EnvOverride 
-> MiniBuildPlan 
-> (PackageName -> Bool)

is it shadowed by a local package?

-> Map PackageName (Set PackageName)

required packages, and users of it

-> m (Map PackageName (Version, Map FlagName Bool), Map PackageName (Set PackageName)) 

Determine the necessary packages to install to have the given set of packages available.

This function will not provide test suite and benchmark dependencies.

This may fail if a target package is not present in the BuildPlan.

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

Find a snapshot and set of flags that is compatible with the given GenericPackageDescription. Returns Nothing if no such snapshot is found.

type ToolMap = Map ByteString (Set PackageName) Source

Look up with packages provide which tools.

getToolMap :: MiniBuildPlan -> Map ByteString (Set PackageName) Source

Map from tool name to package providing it

parseCustomMiniBuildPlan Source


:: (MonadIO m, MonadCatch m, MonadLogger m, MonadReader env m, HasHttpManager env, HasConfig env, MonadBaseControl IO m) 
=> Path Abs File

stack.yaml file location

-> Text 
-> m MiniBuildPlan