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

Safe HaskellSafe
LanguageHaskell2010

System.Process.Lens

Description

Lenses and traversals for CreateProcess and related types.

These are provided as a convenience and aren't at all required to use the other modules of this package.

For basic lens functionality with few dependencies, the microlens package is a good option.

Synopsis

Documentation

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

_cmdspec :: Lens' CreateProcess CmdSpec 

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

_ShellCommand :: Traversal' CmdSpec String

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

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

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

_cwd :: Lens' CreateProcess (Maybe FilePath)

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

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

envAt :: (Eq k, Applicative f) => k -> (Maybe v -> f (Maybe v)) -> [(k, v)] -> f [(k, v)] Source #

An improper lens to get and insert values in an association list. It assumes that there are no duplicate keys in the list.

std_streams :: forall f. Functor f => ((StdStream, StdStream, StdStream) -> f (StdStream, StdStream, StdStream)) -> CreateProcess -> f CreateProcess Source #

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

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

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

_new_session :: forall f. Functor f => (Bool -> f Bool) -> CreateProcess -> f CreateProcess Source #