| Copyright | 2019 Emily Pillmore |
|---|---|
| License | BSD |
| Maintainer | Emily Pillmore <emilypi@cohomolo.gy> |
| Stability | Experimental |
| Portability | TypeFamilies, Rank2Types |
| Safe Haskell | Safe |
| Language | Haskell2010 |
System.Process.Microlens.StdStream
Description
Synopsis
- _Inherit :: Traversal' StdStream StdStream
- _UseHandle :: Traversal' StdStream Handle
- _CreatePipe :: Traversal' StdStream StdStream
- _NoStream :: Traversal' StdStream StdStream
- class IsCreatePipe a where
- class IsInherit a where
- _Inherits :: Traversal' a StdStream
- class IsUseHandle a where
- _UsesHandle :: Traversal' a Handle
- class IsNoStream a where
- inheriting :: Lens' a StdStream -> a -> a
- piping :: Lens' a StdStream -> a -> a
- handling :: Lens' a StdStream -> Handle -> a -> a
- nostreaming :: Lens' a StdStream -> a -> a
Traversals
_Inherit :: Traversal' StdStream StdStream Source #
A Traversal' into the Inherit structure of a StdStream
_UseHandle :: Traversal' StdStream Handle Source #
A Traversal' into the UseHandle structure's Handle for a StdStream
_CreatePipe :: Traversal' StdStream StdStream Source #
A Traversal' into the CreatePipe structure of a StdStream
_NoStream :: Traversal' StdStream StdStream Source #
A Traversal' into the NoStream structure of a StdStream
Classy Traversals
class IsCreatePipe a where Source #
Class constraint proving a type has a prism into a Handle via
a UseHandle structure. Any StdStream will have a prism into
CreatePipe - it is just an overwrite to CreatePipe
Methods
Instances
| IsCreatePipe StdStream Source # | |
Defined in System.Process.Microlens.StdStream Methods | |
class IsInherit a where Source #
Class constraint proving a type has a prism into an Inherit
structure. Any StdStream will have a prism into Inherit -
it is just an overwrite to Inherit
Methods
_Inherits :: Traversal' a StdStream Source #
class IsUseHandle a where Source #
Methods
_UsesHandle :: Traversal' a Handle Source #
Instances
| IsUseHandle StdStream Source # | |
Defined in System.Process.Microlens.StdStream Methods | |
class IsNoStream a where Source #
Class constraint proving a type has a prism into a Handle via
a UseHandle structure. Any StdStream will have a prism into
NoStream - it is just an overwrite to NoStream.
Methods
_NoStreams :: Traversal' a StdStream Source #
Instances
| IsNoStream StdStream Source # | |
Defined in System.Process.Microlens.StdStream Methods | |
Combinators
inheriting :: Lens' a StdStream -> a -> a Source #
handling :: Lens' a StdStream -> Handle -> a -> a Source #
Given a lens into a StdStream and a handle, set the handle using
UseHandle. Note that this is the only really interesting case for anything
with a lens into a handle inculding StdStream.
Examples:
>>>handling ($) System.stdin $ UseHandle System.stdoutUseHandle {handle: <stdin>}
>>>handling ($) System.stdout InheritUseHandle {handle: <stdout>}