-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Micro-optics for the process library -- -- 'microlens-process' is a set of multi-purpose optics and convenience -- combinators for working with the process library, including a -- more well-typed api for the parts that can be typed. @package microlens-process @version 0.1.0.2 -- | This module provides the associated optics and combinators for working -- with CommandSpec objects. CommandSpec consists of -- two cases: a Shell command, which is a command to execute naively in -- the shell, and a Raw command which is a command path together with its -- arguments. -- -- CommandSpec has two cases, and therefore a prism into those -- two cases. There is also a convenient Traversal available for -- working with the arglist of a Raw command, as well as associated -- Reviews for each prism, and combinators for working with -- arguments monoidally. -- -- We provide classy variants for all useful prisms module System.Process.Microlens.CommandSpec -- | Traversal' into the arguments of a command -- -- Examples: -- --
-- >>> RawCommand "/bin/ls" ["-l"] ^. arguments -- ["-l"] --arguments :: Traversal' CmdSpec [String] -- | Append an argument to the argument list of a RawCommand -- -- Examples: -- --
-- >>> arguing "-h" $ RawCommand "/bin/ls" ["-l"] -- RawCommand "/bin/ls" ["-l","-h"] ---- --
-- >>> arguing "-h" (RawCommand "/bin/ls" ["-l"]) ^. arguments -- ["-l","-h"] --arguing :: String -> CmdSpec -> CmdSpec -- | 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 `_` i order to denote their lens status. Thankfully, there are 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. module System.Process.Microlens.CreateProcess -- | Lens into the cmdspec entry of the CreateProcess record cmdspec_ :: Lens' CreateProcess CmdSpec -- | Lens into the cwd entry of the CreateProcess record cwd_ :: Lens' CreateProcess (Maybe FilePath) -- | Lens into the env entry of the CreateProcess record env_ :: Lens' CreateProcess (Maybe [(String, String)]) -- | Lens into the std_in entry of the CreateProcess record stdin_ :: Lens' CreateProcess StdStream -- | Lens into the std_out entry of the CreateProcess record stdout_ :: Lens' CreateProcess StdStream -- | Lens into the std_err entry of the CreateProcess record stderr_ :: Lens' CreateProcess StdStream -- | Lens into the close_fds entry of the CreateProcess -- record closefds :: Lens' CreateProcess Bool -- | Lens into the create_group entry of the CreateProcess -- record creategroup :: Lens' CreateProcess Bool -- | Lens into the create_new_console entry of the -- CreateProcess record createnewconsole :: Lens' CreateProcess Bool -- | Lens into the delegate_ctlc entry of the CreateProcess -- record delegatectlc :: Lens' CreateProcess Bool -- | Lens into the detach_console entry of the CreateProcess -- record detachconsole :: Lens' CreateProcess Bool -- | Lens into the new_session entry of the CreateProcess -- record newsession :: Lens' CreateProcess Bool -- | Lens into the child_group entry of the CreateProcess -- record childgroup :: Lens' CreateProcess (Maybe CGid) -- | Lens into the child_user entry of the CreateProcess -- record childuser :: Lens' CreateProcess (Maybe CUid) -- | Lens into the use_process_jobs entry of the -- CreateProcess record useprocessjobs :: Lens' CreateProcess Bool -- | Classy lens for types with a stdin class HasStdin a _Stdin :: HasStdin a => Lens' a StdStream -- | Classy lens for types with a stdout class HasStdout a _Stdout :: HasStdout a => Lens' a StdStream -- | Classy lens for types with a stderr class HasStderr a _Stderr :: HasStderr a => Lens' a StdStream instance System.Process.Microlens.CreateProcess.HasStderr System.Process.Common.StdStream instance System.Process.Microlens.CreateProcess.HasStderr System.Process.Common.CreateProcess instance System.Process.Microlens.CreateProcess.HasStdout System.Process.Common.StdStream instance System.Process.Microlens.CreateProcess.HasStdout System.Process.Common.CreateProcess instance System.Process.Microlens.CreateProcess.HasStdin System.Process.Common.StdStream instance System.Process.Microlens.CreateProcess.HasStdin System.Process.Common.CreateProcess -- | This module provides all of the optical exports, as well ask any -- associated combinators. For just the optics, see Optics, or if -- you are in need of something lighter weight, just for working with a -- CreateProcess in terms of getters and setters, see -- https://hackage.haskell.org/package/microlens -- -- For more information on usage and how to work with lenses, see -- http://github.com/ekmett/lens/wiki and the tests for example -- uses. You can also ask questions on Freenode in the #haskell-lens -- channel. module System.Process.Microlens -- | Lens into the cmdspec entry of the CreateProcess record cmdspec_ :: Lens' CreateProcess CmdSpec -- | Lens into the cwd entry of the CreateProcess record cwd_ :: Lens' CreateProcess (Maybe FilePath) -- | Lens into the env entry of the CreateProcess record env_ :: Lens' CreateProcess (Maybe [(String, String)]) -- | Lens into the std_in entry of the CreateProcess record stdin_ :: Lens' CreateProcess StdStream -- | Lens into the std_out entry of the CreateProcess record stdout_ :: Lens' CreateProcess StdStream -- | Lens into the std_err entry of the CreateProcess record stderr_ :: Lens' CreateProcess StdStream -- | Lens into the close_fds entry of the CreateProcess -- record closefds :: Lens' CreateProcess Bool -- | Lens into the create_group entry of the CreateProcess -- record creategroup :: Lens' CreateProcess Bool -- | Lens into the delegate_ctlc entry of the CreateProcess -- record delegatectlc :: Lens' CreateProcess Bool -- | Lens into the detach_console entry of the CreateProcess -- record detachconsole :: Lens' CreateProcess Bool -- | Lens into the new_session entry of the CreateProcess -- record newsession :: Lens' CreateProcess Bool -- | Lens into the child_group entry of the CreateProcess -- record childgroup :: Lens' CreateProcess (Maybe CGid) -- | Lens into the child_user entry of the CreateProcess -- record childuser :: Lens' CreateProcess (Maybe CUid) -- | Lens into the use_process_jobs entry of the -- CreateProcess record useprocessjobs :: Lens' CreateProcess Bool -- | Traversal' into the arguments of a command -- -- Examples: -- --
-- >>> RawCommand "/bin/ls" ["-l"] ^. arguments -- ["-l"] --arguments :: Traversal' CmdSpec [String] -- | Classy lens for types with a stdin class HasStdin a _Stdin :: HasStdin a => Lens' a StdStream -- | Classy lens for types with a stdout class HasStdout a _Stdout :: HasStdout a => Lens' a StdStream -- | Classy lens for types with a stderr class HasStderr a _Stderr :: HasStderr a => Lens' a StdStream -- | Append an argument to the argument list of a RawCommand -- -- Examples: -- --
-- >>> arguing "-h" $ RawCommand "/bin/ls" ["-l"] -- RawCommand "/bin/ls" ["-l","-h"] ---- --
-- >>> arguing "-h" (RawCommand "/bin/ls" ["-l"]) ^. arguments -- ["-l","-h"] --arguing :: String -> CmdSpec -> CmdSpec