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
- _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
Instances
IsCreatePipe StdStream Source # | |
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
_Inherits :: Traversal' a StdStream Source #
class IsUseHandle a where Source #
_UsesHandle :: Traversal' a Handle Source #
Instances
IsUseHandle StdStream Source # | |
Defined in System.Process.Microlens.StdStream |
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 |
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>}