Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
Promises for processes
- processPromise :: FilePath -> [String] -> String -> IO (Promise ProcessResult)
- processPromiseCallback :: (ProcessResult -> IO ()) -> FilePath -> [String] -> String -> IO (Promise ProcessResult)
- data ProcessResult = ProcessResult {}
- data ExitCode :: *
Documentation
:: FilePath | Program to run |
-> [String] | Arguments |
-> String | Input string (stdin) |
-> IO (Promise ProcessResult) | Promise object |
Make a Promise
:: (ProcessResult -> IO ()) | Callback |
-> FilePath | Program to run |
-> [String] | Arguments |
-> String | Input string (stdin) |
-> IO (Promise ProcessResult) | Promise object |
Make a Promise
, but add a callback that will
be run when the process finishes nicely.
This hook is mainly intended for logging.
data ProcessResult Source
The result from a process
data ExitCode :: *
Defines the exit codes that a program can return.
ExitSuccess | indicates successful termination; |
ExitFailure Int | indicates program failure with an exit code. The exact interpretation of the code is operating-system dependent. In particular, some values may be prohibited (e.g. 0 on a POSIX-compliant system). |