stack-1.4.0: The Haskell Tool Stack

Safe Haskell | None
Language | Haskell2010

Stack.Build.Execute

Contents

- Running Setup.hs

Description

Perform a build

Synopsis

- printPlan :: StackM env m => Plan -> m ()
- preFetch :: (StackM env m, HasEnvConfig env) => Plan -> m ()
- executePlan :: (StackM env m, HasEnvConfig env) => EnvOverride -> BuildOptsCLI -> BaseConfigOpts -> [LocalPackage] -> [DumpPackage () () ()] -> [DumpPackage () () ()] -> [DumpPackage () () ()] -> InstalledMap -> Map PackageName SimpleTarget -> Plan -> m ()
- data ExecuteEnv
- withExecuteEnv :: (StackM env m, HasEnvConfig env) => EnvOverride -> BuildOpts -> BuildOptsCLI -> BaseConfigOpts -> [LocalPackage] -> [DumpPackage () () ()] -> [DumpPackage () () ()] -> [DumpPackage () () ()] -> (ExecuteEnv -> m a) -> m a
- withSingleContext :: (StackM env m, HasEnvConfig env) => (m () -> IO ()) -> ActionContext -> ExecuteEnv -> Task -> Maybe (Map PackageIdentifier GhcPkgId) -> Maybe String -> (Package -> Path Abs File -> Path Abs Dir -> (Bool -> [String] -> m ()) -> (Text -> m ()) -> Bool -> Maybe (Path Abs File, Handle) -> m a) -> m a

# Documentation

printPlan :: StackM env m => Plan -> m () #

Print a description of build plan for human consumption.

preFetch :: (StackM env m, HasEnvConfig env) => Plan -> m () #

Fetch the packages necessary for a build, for example in combination with a dry run.

executePlan #

Arguments

:: (StackM env m, HasEnvConfig env) |
=> EnvOverride |
-> BuildOptsCLI |
-> BaseConfigOpts |
-> [LocalPackage] |
-> [DumpPackage () () ()] | global packages
-> [DumpPackage () () ()] | snapshot packages
-> [DumpPackage () () ()] | local packages
-> InstalledMap |
-> Map PackageName SimpleTarget |
-> Plan |
-> m () |

Perform the actual plan

# Running Setup.hs

data ExecuteEnv #

withExecuteEnv #

Arguments

:: (StackM env m, HasEnvConfig env) |
=> EnvOverride |
-> BuildOpts |
-> BuildOptsCLI |
-> BaseConfigOpts |
-> [LocalPackage] |
-> [DumpPackage () () ()] | global packages
-> [DumpPackage () () ()] | snapshot packages
-> [DumpPackage () () ()] | local packages
-> (ExecuteEnv -> m a) |
-> m a |

Execute a callback that takes an `ExecuteEnv`.

withSingleContext #

Arguments

:: (StackM env m, HasEnvConfig env) |
=> (m () -> IO ()) |
-> ActionContext |
-> ExecuteEnv |
-> Task |
-> Maybe (Map PackageIdentifier GhcPkgId) | All dependencies' package ids to provide to Setup.hs. If Nothing, just provide global and snapshot package databases.
-> Maybe String |
-> (Package -> Path Abs File -> Path Abs Dir -> (Bool -> [String] -> m ()) -> (Text -> m ()) -> Bool -> Maybe (Path Abs File, Handle) -> m a) |
-> m a |