streaming: A free monad transformer optimized for streaming applications.
Stream can be used wherever FreeT is used. The compiler's
standard range of optimizations work better for 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 follows
Pipes.Prelude, but cleverly omits the pipes. It is focused
on employment with base functors which generate
effectful sequences. These appear elsewhere under titles like
pipes: Producer a m r, Producer a m (Producer a m r), FreeT (Producer a m) m r io-streams: InputStream a, Generator a r conduit: Source m a, ConduitM () o m r
and the like.
Interoperation with pipes is accomplished with this isomorphism:
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
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)
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 =$=.
Downloads
- streaming-0.1.0.10.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
| Versions [RSS] | 0.1.0.0, 0.1.0.1, 0.1.0.3, 0.1.0.4, 0.1.0.5, 0.1.0.6, 0.1.0.7, 0.1.0.8, 0.1.0.9, 0.1.0.10, 0.1.0.11, 0.1.0.12, 0.1.0.13, 0.1.0.14, 0.1.0.15, 0.1.0.16, 0.1.0.17, 0.1.0.18, 0.1.0.19, 0.1.0.20, 0.1.1.0, 0.1.1.1, 0.1.2.0, 0.1.2.2, 0.1.3.0, 0.1.3.1, 0.1.3.2, 0.1.3.3, 0.1.3.4, 0.1.4.0, 0.1.4.1, 0.1.4.2, 0.1.4.3, 0.1.4.4, 0.1.4.5, 0.2.0.0, 0.2.1.0, 0.2.2.0, 0.2.3.0, 0.2.3.1, 0.2.4.0 |
|---|---|
| Dependencies | base (>=4.6 && <4.9), mmorph (>=1.0 && <1.2), mtl (>=2.1 && <2.3), transformers (>=0.3 && <0.5) [details] |
| License | BSD-3-Clause |
| Author | michaelt |
| Maintainer | what_is_it_to_do_anything@yahoo.com |
| Uploaded | by MichaelThompson at 2015-08-27T13:48:20Z |
| Category | Data, Pipes |
| Home page | https://github.com/michaelt/streaming |
| Bug tracker | https://github.com/michaelt/streaming/issues |
| Source repo | head: git clone https://github.com/michaelt/streaming |
| Reverse Dependencies | 84 direct, 94 indirect [details] |
| Downloads | 49955 total (161 in the last 30 days) |
| Rating | 2.5 (votes: 6) [estimated by Bayesian average] |
| Your Rating | |
| Status | Docs available [build log] Last success reported on 2015-08-27 [all 1 reports] |