-- 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.1.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 -> 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. 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) -- | The output of a process data Process t Process :: ProcessHandle -> Event t ByteString -> Event t ByteString -> Event t ExitCode -> Event t Signal -> Process t [_process_handle] :: Process t -> 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 -> Event t ByteString -- | Fires whenever there's some new stderr output. See note on -- _process_stdout. [_process_stderr] :: Process t -> Event t ByteString [_process_exit] :: Process t -> Event t ExitCode -- | Fires when a signal has actually been sent to the process (via -- _processConfig_signal). [_process_signal] :: Process t -> Event t Signal -- | The inputs to a process data ProcessConfig t ProcessConfig :: Event t ByteString -> Event t Signal -> ProcessConfig t -- | "stdin" input to be fed to the process [_processConfig_stdin] :: ProcessConfig t -> Event t ByteString -- | Signals to send to the process [_processConfig_signal] :: ProcessConfig t -> Event t Signal instance Reflex.Class.Reflex t => Data.Default.Class.Default (Reflex.Process.ProcessConfig t)