-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | reflex-frp interface for running shell commands -- -- Run shell commands from within reflex applications and interact with -- them over a functional-reactive interface @package reflex-process @version 0.2.0.0 module Reflex.Process -- | 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. createProcess :: (MonadIO m, TriggerEvent t m, PerformEvent t m, MonadIO (Performable m)) => CreateProcess -> ProcessConfig t ByteString -> m (Process t ByteString ByteString) -- | 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. 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) -- | The output of a process data Process t o e Process :: ProcessHandle -> Event t o -> Event t e -> Event t ExitCode -> Event t Signal -> Process t o e [_process_handle] :: Process t o e -> ProcessHandle -- | Fires whenever there's some new stdout output. Depending on the -- buffering strategy of the implementation, this could be anything from -- whole lines to individual characters. [_process_stdout] :: Process t o e -> Event t o -- | Fires whenever there's some new stderr output. See note on -- _process_stdout. [_process_stderr] :: Process t o e -> Event t e [_process_exit] :: Process t o e -> Event t ExitCode -- | Fires when a signal has actually been sent to the process (via -- _processConfig_signal). [_process_signal] :: Process t o e -> Event t Signal -- | The inputs to a process data ProcessConfig t i ProcessConfig :: Event t i -> Event t Signal -> ProcessConfig t i -- | "stdin" input to be fed to the process [_processConfig_stdin] :: ProcessConfig t i -> Event t i -- | Signals to send to the process [_processConfig_signal] :: ProcessConfig t i -> Event t Signal instance Reflex.Class.Reflex t => Data.Default.Class.Default (Reflex.Process.ProcessConfig t i)