| Copyright | 2019 Emily Pillmore |
|---|---|
| License | BSD |
| Maintainer | Emily Pillmore <emilypi@cohomolo.gy> |
| Stability | Experimental |
| Portability | TypeFamilies, RankNTypes |
| Safe Haskell | Safe |
| Language | Haskell2010 |
System.Process.Lens
Contents
Description
Everything all together
Synopsis
- _ShellCommand :: Prism' CmdSpec String
- _RawCommand :: Prism' CmdSpec (FilePath, [String])
- arguments :: Traversal' CmdSpec [String]
- _Inherit :: Prism' StdStream StdStream
- _UseHandle :: Prism' StdStream Handle
- _CreatePipe :: Prism' StdStream StdStream
- _NoStream :: Prism' StdStream StdStream
- cmdspec_ :: Lens' CreateProcess CmdSpec
- cwd_ :: Lens' CreateProcess (Maybe FilePath)
- env_ :: Lens' CreateProcess (Maybe [(String, String)])
- stdin :: Lens' CreateProcess StdStream
- stdout :: Lens' CreateProcess StdStream
- stderr :: Lens' CreateProcess StdStream
- closefds :: Lens' CreateProcess Bool
- creategroup :: Lens' CreateProcess Bool
- delegatectlc :: Lens' CreateProcess Bool
- detachconsole :: Lens' CreateProcess Bool
- newsession :: Lens' CreateProcess Bool
- childgroup :: Lens' CreateProcess (Maybe CGid)
- childuser :: Lens' CreateProcess (Maybe CUid)
- useprocessjobs :: Lens' CreateProcess Bool
- class IsRaw a where
- class IsShell a where
- class IsInherit a where
- class IsUseHandle a where
- _UsesHandle :: Prism' a Handle
- class IsCreatePipe a where
- _CreatesPipe :: Prism' a StdStream
- class IsNoStream a where
- _NoStreams :: Prism' a StdStream
- class HasStdin a where
- class HasStdout a where
- class HasStderr a where
- closing :: IsUseHandle a => Getter CreateProcess a -> CreateProcess -> IO ()
- inheriting :: IsInherit a => Lens' a StdStream -> a -> a
- piping :: IsCreatePipe a => Lens' a StdStream -> a -> a
- handling :: IsUseHandle a => Lens' a StdStream -> Handle -> a -> a
- nostreaming :: IsNoStream a => Lens' a StdStream -> a -> a
- arguing :: String -> CmdSpec -> CmdSpec
- rawOf :: IsRaw a => FilePath -> [String] -> a
- shellOf :: IsShell a => String -> a
- usehandleOf :: IsUseHandle a => Handle -> a
Optics
_ShellCommand :: Prism' CmdSpec String Source #
A prism into the ShellCommand case of a CmdSpec
_RawCommand :: Prism' CmdSpec (FilePath, [String]) Source #
A prism into the RawCommand case of a CmdSpec
arguments :: Traversal' CmdSpec [String] Source #
Traversal' into the arguments of a command
_CreatePipe :: Prism' StdStream StdStream Source #
A prism into the CreatePipe structure of a StdStream
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
creategroup :: Lens' CreateProcess Bool Source #
Lens into the create_group entry of the CreateProcess record
delegatectlc :: Lens' CreateProcess Bool Source #
Lens into the delegate_ctlc entry of the CreateProcess record
detachconsole :: Lens' CreateProcess Bool Source #
Lens into the detach_console 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
useprocessjobs :: Lens' CreateProcess Bool Source #
Lens into the use_process_jobs entry of the CreateProcess record
Classes
Classy prism into the shell command of a CmdSpec
class IsUseHandle a where Source #
Methods
_UsesHandle :: Prism' a Handle Source #
Instances
| IsUseHandle StdStream Source # | |
Defined in System.Process.Lens.StdStream | |
class IsCreatePipe a where Source #
Methods
_CreatesPipe :: Prism' a StdStream Source #
Instances
| IsCreatePipe StdStream Source # | |
Defined in System.Process.Lens.StdStream | |
class IsNoStream a where Source #
Methods
_NoStreams :: Prism' a StdStream Source #
Instances
| IsNoStream StdStream Source # | |
Defined in System.Process.Lens.StdStream | |
Combinators
closing :: IsUseHandle a => Getter CreateProcess a -> CreateProcess -> IO () Source #
Close something with a prism into a non-standard Handle in a CreateProcess
piping :: IsCreatePipe a => Lens' a StdStream -> a -> a Source #
Given a lens into a StdStream, overwrite to CreatePipe, piping
the process
nostreaming :: IsNoStream a => Lens' a StdStream -> a -> a Source #
arguing :: String -> CmdSpec -> CmdSpec Source #
Append an argument to the argument list of a RawCommand
rawOf :: IsRaw a => FilePath -> [String] -> a Source #
Lift a FilePath and list of arguments into a type via RawCommand
with a prism into the command
shellOf :: IsShell a => String -> a Source #
Lift a String into a type via ShellCommand with a prism into the
command
usehandleOf :: IsUseHandle a => Handle -> a Source #
Inject a handle into something with a prism into the handle