lens-process-0.3.0.1: Optics for system processes
Copyright2019 Emily Pillmore
LicenseBSD
MaintainerEmily Pillmore <emilypi@cohomolo.gy>
StabilityExperimental
PortabilityTypeFamilies, Rank2Types
Safe HaskellNone
LanguageHaskell2010

System.Process.Lens.CreateProcess

Description

This module provides the associated optics and combinators for working with CreateProcess objects.

Because CreateProcess was created before the `_` prefix record name convention, some record accessors don't have an apparently "good" name for their corresponding lens. Those that do not are post-fixed with `_`. Thankfully, there are only 6 that meet the criteria: cmdspec_, env_, cwd_, stdin_, stdout_, and stderr_.

We provide classy variants of what we consider the significant portions of CreateProcess - namely, the std_in, std_out, and std_err entries.

Synopsis

Lenses

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

newsession :: Lens' CreateProcess Bool Source #

Lens into the new_session entry of the CreateProcess record

detachconsole :: Lens' CreateProcess Bool Source #

Lens into the detach_console entry of the CreateProcess record

createnewconsole :: Lens' CreateProcess Bool Source #

Lens into the create_new_console 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

Classy Lenses

class HasStdin a where Source #

Classy lens for types with a stdin

Methods

_Stdin :: Lens' a StdStream Source #

Instances

Instances details
HasStdin CreateProcess Source # 
Instance details

Defined in System.Process.Lens.CreateProcess

HasStdin StdStream Source # 
Instance details

Defined in System.Process.Lens.CreateProcess

class HasStdout a where Source #

Classy lens for types with a stdout

Methods

_Stdout :: Lens' a StdStream Source #

Instances

Instances details
HasStdout CreateProcess Source # 
Instance details

Defined in System.Process.Lens.CreateProcess

HasStdout StdStream Source # 
Instance details

Defined in System.Process.Lens.CreateProcess

class HasStderr a where Source #

Classy lens for types with a stderr

Methods

_Stderr :: Lens' a StdStream Source #

Instances

Instances details
HasStderr CreateProcess Source # 
Instance details

Defined in System.Process.Lens.CreateProcess

HasStderr StdStream Source # 
Instance details

Defined in System.Process.Lens.CreateProcess