lens-process-0.0.2.0: Optics for system processes

Copyright2019 Emily Pillmore
LicenseBSD
MaintainerEmily Pillmore <emilypi@cohomolo.gy>
StabilityExperimental
PortabilityTypeFamilies, Rank2Types
Safe HaskellSafe
LanguageHaskell2010

System.Process.Lens.CreateProcess

Contents

Description

CreateProcess lenses and combinators

Synopsis

Optics

cmdspec_ :: Lens' CreateProcess CmdSpec Source #

Lens into the cmdspec entry of the CreateProcess record

cwd_ :: Lens' CreateProcess (Maybe FilePath) Source #

Lens into the cwd entry of the CreateProcess record

env_ :: Lens' CreateProcess (Maybe [(String, String)]) Source #

Lens into the env entry of the CreateProcess record

stdin :: Lens' CreateProcess StdStream Source #

Lens into the std_in entry of the CreateProcess record

stdout :: Lens' CreateProcess StdStream Source #

Lens into the std_out entry of the CreateProcess record

stderr :: Lens' CreateProcess StdStream Source #

Lens into the std_err entry of the CreateProcess record

closefds :: Lens' CreateProcess Bool Source #

Lens into the close_fds entry of the CreateProcess record

newsession :: Lens' CreateProcess Bool Source #

Lens into the new_session entry of the CreateProcess record

childgroup :: Lens' CreateProcess (Maybe CGid) Source #

Lens into the child_group entry of the CreateProcess record

childuser :: Lens' CreateProcess (Maybe CUid) Source #

Lens into the child_user entry of the CreateProcess record

Combinators

stdoutOf :: CreateProcess -> Maybe Handle Source #

Retrieve the stdin handle associated with a CreateProcess

stdinOf :: CreateProcess -> Maybe Handle Source #

Retrieve the stdout handle associated with a CreateProcess

stderrOf :: CreateProcess -> Maybe Handle Source #

Retrieve the stderr handle associated with a CreateProcess

closing :: HasUseHandle a => Getter CreateProcess a -> CreateProcess -> IO () Source #

Close something with a prism into a non-standard Handle in a CreateProcess

inheriting :: Lens' a StdStream -> a -> a Source #

Given a lens into a StdStream, overwrite to Inherit so that the stream inherits from its parent process

piping :: Lens' a StdStream -> a -> a Source #

Given a lens into a StdStream, overwrite to CreatePipe, piping the process

handling :: Lens' a StdStream -> Handle -> a -> a Source #

Given a lens into a StdStream and a handle, set the handle using UseHandle.

nostreaming :: Lens' a StdStream -> a -> a Source #

Given a lens into a StdStream, set to NoStream