| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Reflex.Process
Description
Synopsis
- createProcess :: (MonadIO m, TriggerEvent t m, PerformEvent t m, MonadIO (Performable m)) => CreateProcess -> ProcessConfig t ByteString -> m (Process t ByteString ByteString)
- createRedirectedProcess :: (MonadIO m, TriggerEvent t m, PerformEvent t m, MonadIO (Performable m)) => (Handle -> IO (i -> IO ())) -> (Handle -> (o -> IO ()) -> IO (IO ())) -> (Handle -> (e -> IO ()) -> IO (IO ())) -> CreateProcess -> ProcessConfig t i -> m (Process t o e)
- data Process t o e = Process {
- _process_handle :: ProcessHandle
- _process_stdout :: Event t o
- _process_stderr :: Event t e
- _process_exit :: Event t ExitCode
- _process_signal :: Event t Signal
- data ProcessConfig t i = ProcessConfig {
- _processConfig_stdin :: Event t i
- _processConfig_signal :: Event t Signal
Documentation
createProcess :: (MonadIO m, TriggerEvent t m, PerformEvent t m, MonadIO (Performable m)) => CreateProcess -> ProcessConfig t ByteString -> m (Process t ByteString ByteString) Source #
Run a shell process, feeding it input using an Event and exposing its output
Events representing the process exit code, stdout and stderr.
The input Handle is not buffered and the output Handles are line-buffered.
NB: The std_in, std_out, and std_err parameters of the
provided CreateProcess are replaced with new pipes and all output is redirected
to those pipes.
createRedirectedProcess Source #
Arguments
| :: (MonadIO m, TriggerEvent t m, PerformEvent t m, MonadIO (Performable m)) | |
| => (Handle -> IO (i -> IO ())) | Builder for the standard input handler |
| -> (Handle -> (o -> IO ()) -> IO (IO ())) | Builder for the standard output handler |
| -> (Handle -> (e -> IO ()) -> IO (IO ())) | Builder for the standard error handler |
| -> CreateProcess | |
| -> ProcessConfig t i | |
| -> m (Process t o e) |
Runs a process and uses the given input and output handler functions to
interact with the process via the standard streams. Used to implement
createProcess.
NB: The std_in, std_out, and std_err parameters of the
provided CreateProcess are replaced with new pipes and all output is redirected
to those pipes.
The output of a process
Constructors
| Process | |
Fields
| |
data ProcessConfig t i Source #
The inputs to a process
Constructors
| ProcessConfig | |
Fields
| |
Instances
| Reflex t => Default (ProcessConfig t i) Source # | |
Defined in Reflex.Process Methods def :: ProcessConfig t i # | |