streaming
Version 0.1.0.5 revision 1 uploaded by HerbertValerioRiedel.
Package meta
- Synopsis
- A free monad transformer optimized for streaming applications.
- Description
Stream can be used wherever FreeT is used. The compiler is better able to optimize operations written in terms of Stream.
See the examples in
Streaming.Prelude
for a sense of how simple the library is to use and think about.Streaming.Prelude
closely followsPipes.Prelude
, but cleverly omits the pipes. It is focused on employment with a base functors which generate effectful sequences: i.e., things likePipes.Producer
Conduit.Source
IOStreams.InputStream
IOStreams.Generator
Interoperation with pipes is accomplished with this isomorphism which uses
Pipes.Prelude.unfoldr
fromHEAD
:Pipes.unfoldr Streaming.next :: Stream (Of a) m r -> Producer a m r Streaming.unfoldr Pipes.next :: Producer a m r -> Stream (Of a) m r
(If you don't have
pipes-HEAD
, inline the definition of unfoldr.)Interoperation with io-streams is thus:
Streaming.reread IOStreams.read :: InputStream a -> Stream (Of a) IO () IOStreams.unfoldM Streaming.uncons :: Stream (Of a) IO () -> IO (InputStream a)
for example. A simple exit to conduit would be, e.g.:
Conduit.unfoldM Streaming.uncons :: Stream (Of a) m () -> Source m a
These conversions should never be more expensive than a single
>->
or=$=
.- Author
- michaelt
- Bug reports
- https://github.com/michaelt/streaming/issues
- Category
- Data, Pipes
- Copyright
- n/a
- Homepage
- https://github.com/michaelt/streaming
- Maintainer
- what_is_it_to_do_anything@yahoo.com
- Package URL
- n/a
- Stability
- Experimental