Copyright | 2019 Emily Pillmore |
---|---|
License | BSD |
Maintainer | Emily Pillmore <emilypi@cohomolo.gy> |
Stability | Experimental |
Portability | TypeFamilies, Rank2Types |
Safe Haskell | Safe |
Language | Haskell2010 |
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
- class IsUseHandle a where
- 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
_UseHandle :: Traversal' StdStream Handle Source #
_CreatePipe :: Traversal' StdStream StdStream Source #
A Traversal'
into the CreatePipe
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
_CreatesPipe :: Traversal' a StdStream Source #
Instances
IsCreatePipe StdStream Source # | |
Defined in System.Process.Microlens.StdStream _CreatesPipe :: Traversal' StdStream StdStream Source # |
class IsUseHandle a where Source #
_UsesHandle :: Traversal' a Handle Source #
Instances
IsUseHandle StdStream Source # | |
Defined in System.Process.Microlens.StdStream _UsesHandle :: Traversal' StdStream Handle Source # |
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
.
_NoStreams :: Traversal' a StdStream Source #
Instances
IsNoStream StdStream Source # | |
Defined in System.Process.Microlens.StdStream _NoStreams :: Traversal' StdStream StdStream Source # |
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.stdout
UseHandle {handle: <stdin>}
>>>
handling ($) System.stdout Inherit
UseHandle {handle: <stdout>}