streaming: A free monad transformer optimized for streaming applications.

[ bsd3, data, library, pipes, streaming ] [ Propose Tags ]

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 follows Pipes.Prelude, but cleverly omits the pipes. It is focused on employment with a base functors which generate effectful sequences: i.e., things like

Interoperation with pipes is accomplished with this isomorphism which uses Pipes.Prelude.unfoldr from HEAD:

Pipes.unfoldr        :: Stream (Of a) m r   -> Producer a m r
Streaming.unfoldr        :: 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     :: 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 =$=.

Dependencies base (>=4.7 && <4.9), ghc-prim, mmorph (>=1.0 && <1.2), mtl (>=2.1 && <2.3), transformers (>=0.3 && <0.5) [details]
License BSD-3-Clause
Author michaelt
Category Data, Pipes
Home page
Bug tracker
Source repo head: git clone
Uploaded by MichaelThompson at Mon Aug 17 04:44:58 UTC 2015
Distributions LTSHaskell:, NixOS:, Stackage:, openSUSE:
Downloads 9346 total (185 in the last 30 days)
Rating 2.5 (votes: 6) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]
Hackage Matrix CI




Maintainer's Corner

For package maintainers and hackage trustees