| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Reflex.Process
Description
Synopsis
- createProcess :: (MonadIO m, TriggerEvent t m, PerformEvent t m, MonadIO (Performable m)) => CreateProcess -> ProcessConfig t -> m (Process t)
- createRedirectedProcess :: (MonadIO m, TriggerEvent t m, PerformEvent t m, MonadIO (Performable m)) => (Handle -> IO (ByteString -> IO ())) -> (Handle -> (ByteString -> IO ()) -> IO (IO ())) -> CreateProcess -> ProcessConfig t -> m (Process t)
- data Process t = Process {}
- data ProcessConfig t = ProcessConfig {}
Documentation
createProcess :: (MonadIO m, TriggerEvent t m, PerformEvent t m, MonadIO (Performable m)) => CreateProcess -> ProcessConfig t -> m (Process t) 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 (ByteString -> IO ())) | Builder for the stdin handler |
| -> (Handle -> (ByteString -> IO ()) -> IO (IO ())) | Builder for the stdout and stderr handlers |
| -> CreateProcess | |
| -> ProcessConfig t | |
| -> m (Process t) |
Runs a process and uses the given input and output handler functions
to interact with the process. 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 Source #
The inputs to a process
Constructors
| ProcessConfig | |
Fields
| |
Instances
| Reflex t => Default (ProcessConfig t) Source # | |
Defined in Reflex.Process Methods def :: ProcessConfig t # | |