conduit-combinators-1.1.1: Commonly used conduit functions, for both chunked and unchunked data

Safe Haskell | None
Language | Haskell98

Data.Conduit.Combinators.Internal

Description

Internal helper functions, usually used for rewrite rules.

Synopsis

- initReplicate :: Monad m => m seed -> (seed -> m a) -> Int -> Producer m a
- initReplicateConnect :: Monad m => m seed -> (seed -> m a) -> Int -> Sink a m b -> m b
- initRepeat :: Monad m => m seed -> (seed -> m a) -> Producer m a
- initRepeatConnect :: Monad m => m seed -> (seed -> m a) -> Sink a m b -> m b

# Documentation

initReplicate :: Monad m => m seed -> (seed -> m a) -> Int -> Producer m a #

Acquire the seed value and perform the given action with it n times, yielding each result.

Subject to fusion

Since 0.2.1

initReplicateConnect :: Monad m => m seed -> (seed -> m a) -> Int -> Sink a m b -> m b #

Optimized version of initReplicate for the special case of connecting with a `Sink`.

Since 0.2.1

initRepeat :: Monad m => m seed -> (seed -> m a) -> Producer m a #

Acquire the seed value and perform the given action with it forever, yielding each result.

Subject to fusion

Since 0.2.1

initRepeatConnect :: Monad m => m seed -> (seed -> m a) -> Sink a m b -> m b #

Optimized version of initRepeat for the special case of connecting with a `Sink`.

Since 0.2.1