System.Process.Extra

extra-1.5: Extra functions I use.

Safe Haskell | None
Language | Haskell2010

System.Process.Extra

Description

Extra functions for creating processes. Specifically variants that automatically check the `ExitCode` and capture the 'stdout'\/'stderr' handles.

Synopsis

- module System.Process
- system_ :: String -> IO ()
- systemOutput :: String -> IO (ExitCode, String)
- systemOutput_ :: String -> IO String

# Documentation

module System.Process

system_ :: String -> IO () #

A version of `system` that throws an error if the `ExitCode` is not `ExitSuccess`.

systemOutput :: String -> IO (ExitCode, String) #

A version of `system` that also captures the output, both `stdout` and `stderr`. Returns a pair of the `ExitCode` and the output.

systemOutput_ :: String -> IO String #

A version of `system` that captures the output (both `stdout` and `stderr`) and throws an error if the `ExitCode` is not `ExitSuccess`.