stack-1.3.2: The Haskell Tool Stack

Safe Haskell | None
Language | Haskell2010

Stack.Exec

Description

Execute commands within the properly configured Stack environment.

Synopsis

- defaultEnvSettings :: EnvSettings
- plainEnvSettings :: EnvSettings
- exec :: (MonadIO m, MonadLogger m, MonadBaseControl IO m) => EnvOverride -> String -> [String] -> m b
- execSpawn :: (MonadIO m, MonadLogger m, MonadBaseControl IO m) => EnvOverride -> String -> [String] -> m b
- execObserve :: (MonadIO m, MonadLogger m, MonadBaseControl IO m) => EnvOverride -> String -> [String] -> m String
- setNoBuffering :: MonadIO m => m ()

# Documentation

defaultEnvSettings :: EnvSettings #

Default `EnvSettings` which includes locals and GHC_PACKAGE_PATH

plainEnvSettings :: EnvSettings #

Environment settings which do not embellish the environment

exec :: (MonadIO m, MonadLogger m, MonadBaseControl IO m) => EnvOverride -> String -> [String] -> m b #

Execute a process within the Stack configured environment.

Execution will not return, because either:

1) On non-windows, execution is taken over by execv of the sub-process. This allows signals to be propagated (#527)

2) On windows, an `ExitCode` exception will be thrown.

execSpawn :: (MonadIO m, MonadLogger m, MonadBaseControl IO m) => EnvOverride -> String -> [String] -> m b #

Like `exec`, but does not use `execv` on non-windows. This way, there is a sub-process, which is helpful in some cases (#1306)

This function only exits by throwing `ExitCode`.

execObserve :: (MonadIO m, MonadLogger m, MonadBaseControl IO m) => EnvOverride -> String -> [String] -> m String #

setNoBuffering :: MonadIO m => m () #