omnifmt-0.2.1.1: A pretty-printer wrapper to faciliate ease of formatting during development.

Copyright(c) Henry J. Wylde, 2015
LicenseBSD3
Maintainerpublic@hjwylde.com
Safe HaskellNone
LanguageHaskell2010

Omnifmt.Process

Contents

Description

System process utilities.

Synopsis

Run

runProcess :: (MonadIO m, MonadLogger m) => FilePath -> [String] -> m (ExitCode, String, String) Source

Runs the given executable with the arguments. Returns the exit code, stdout and stderr.

runProcess_ :: (MonadError ExitCode m, MonadIO m, MonadLogger m) => FilePath -> [String] -> m String Source

Runs the given executable with the arguments. Depending on the exit code, either logs the stderr and exits fast (128) or returns the stdout.

runTimedProcess :: (MonadIO m, MonadLogger m) => Int -> FilePath -> [String] -> m (ExitCode, String, String) Source

Runs the given executable with the arguments. Returns the exit code, stdout and stderr. The command is wrapped in a `timeout -k N*2 N` call.

runCommand :: (MonadIO m, MonadLogger m) => String -> m (ExitCode, String, String) Source

Runs the given command. Returns the exit code, stdout and stderr.

runCommand_ :: (MonadError ExitCode m, MonadIO m, MonadLogger m) => String -> m String Source

Runs the given command. Depending on the exit code, either logs the stderr and exits fast (128) or returns the stdout.

runTimedCommand :: (MonadIO m, MonadLogger m) => Int -> String -> m (ExitCode, String, String) Source

Runs the given command. Returns the exit code, stdout and stderr. The command is wrapped in a `timeout -k N*2 N` call.

runCreateProcess :: (MonadIO m, MonadLogger m) => CreateProcess -> String -> m (ExitCode, String, String) Source

Runs the given CreateProcess. Returns the exit code, stdout and stderr.

runCreateProcess_ :: (MonadError ExitCode m, MonadIO m, MonadLogger m) => CreateProcess -> String -> m String Source

Runs the given CreateProcess. Depending on the exit code, either logs the stderr and exits fast (128) or returns the stdout.