process-streaming-0.3.0.0: Streaming interface to system processes.

Safe HaskellSafe-Inferred

System.Process.Lens

Description

Lenses and traversals for CreateProcess and related types.

Synopsis

Documentation

_cmdspec :: forall f. Functor f => (CmdSpec -> f CmdSpec) -> CreateProcess -> f CreateProcessSource

 _cmdspec :: Lens' CreateProcess CmdSpec 

_ShellCommand :: forall m. Applicative m => (String -> m String) -> CmdSpec -> m CmdSpecSource

 _ShellCommand :: Prism' CmdSpec String

_RawCommand :: forall m. Applicative m => ((FilePath, [String]) -> m (FilePath, [String])) -> CmdSpec -> m CmdSpecSource

 _RawCommand :: Prism' CmdSpec (FilePath,[String])

_cwd :: forall f. Functor f => (Maybe FilePath -> f (Maybe FilePath)) -> CreateProcess -> f CreateProcessSource

 _cwd :: Lens' CreateProcess (Maybe FilePath)

_env :: forall f. Functor f => (Maybe [(String, String)] -> f (Maybe [(String, String)])) -> CreateProcess -> f CreateProcessSource

 _env :: Lens' CreateProcess (Maybe [(String,String)])

streams :: forall f. Functor f => ((StdStream, StdStream, StdStream) -> f (StdStream, StdStream, StdStream)) -> CreateProcess -> f CreateProcessSource

A lens for the (std_in,std_out,std_err) triplet.

 streams :: Lens' CreateProcess (StdStream,StdStream,StdStream)

_close_fds :: forall f. Functor f => (Bool -> f Bool) -> CreateProcess -> f CreateProcessSource

handles :: forall m. Functor m => ((Maybe Handle, Maybe Handle, Maybe Handle) -> m (Maybe Handle, Maybe Handle, Maybe Handle)) -> (Maybe Handle, Maybe Handle, Maybe Handle, ProcessHandle) -> m (Maybe Handle, Maybe Handle, Maybe Handle, ProcessHandle)Source

A Lens for the return value of createProcess that focuses on the handles.

 handlesioe :: Lens' (Maybe Handle, Maybe Handle, Maybe Handle,ProcessHandle) (Maybe Handle, Maybe Handle, Maybe Handle)

handlesioe :: forall m. Applicative m => ((Handle, Handle, Handle) -> m (Handle, Handle, Handle)) -> (Maybe Handle, Maybe Handle, Maybe Handle) -> m (Maybe Handle, Maybe Handle, Maybe Handle)Source

A Prism that removes the Maybes from stdin, stdout and stderr or fails to match if any of them is Nothing.

 handlesioe :: Prism' (Maybe Handle, Maybe Handle, Maybe Handle) -> (Handle, Handle, Handle)

handlesoe :: forall m. Applicative m => ((Handle, Handle) -> m (Handle, Handle)) -> (Maybe Handle, Maybe Handle, Maybe Handle) -> m (Maybe Handle, Maybe Handle, Maybe Handle)Source

A Prism that removes the Maybes from stdout and stderr or fails to match if any of them is Nothing.

 handlesoe :: Prism' (Maybe Handle, Maybe Handle, Maybe Handle) -> (Handle, Handle)