coroutine-iteratee-0.1.1: Bridge between the monad-coroutine and iteratee packages.

Control.Monad.Coroutine.Iteratee

Description

This module provides a bridge between the Control.Monad.Coroutine and the Data.Enumerator monad transformers.

Synopsis

Documentation

coroutineEnumerator :: (Monad m, Monoid s) => Coroutine (Yield [s]) m b -> Enumerator s m cSource

Converts a Coroutine parameterized with the Yield functor into an Enumerator.

enumeratorCoroutine :: Monad m => Enumerator s (Coroutine (Yield [s]) m) () -> Coroutine (Yield [s]) m ()Source

Converts an Enumerator into a Coroutine parameterized with the Yield functor.

coroutineIteratee :: (Monad m, Monoid s) => Coroutine (Await [s]) m (Either SomeException (b, [s])) -> Iteratee s m bSource

Converts a Coroutine parameterized with the Await [x] functor, treating an empty input chunk as EOF, into an Iteratee.

iterateeCoroutine :: (Monad m, Monoid s) => Iteratee s m b -> Coroutine (Await [s]) m (Either SomeException (b, [s]))Source

Converts an Iteratee into a Coroutine parameterized with the Await [x] functor. The coroutine treats an empty input chunk as EOF.

iterateeStreamCoroutine :: Monad m => Iteratee s m b -> Coroutine (Await (Stream s)) m (Either SomeException (b, Stream s))Source

Converts an Iteratee into a Coroutine parameterized with the Await (Stream x) functor.

streamCoroutineIteratee :: Monad m => Coroutine (Await (Stream s)) m (Either SomeException (b, Stream s)) -> Iteratee s m bSource

Converts a Coroutine parameterized with the Await functor into an Iteratee.