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

Control.Monad.Coroutine.Enumerator

Description

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

Synopsis

Documentation

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

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

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

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

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

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

iterateeCoroutine :: Monad m => Iteratee a m b -> Coroutine (Await [a]) m (Either SomeException (b, [a]))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 a m b -> Coroutine (Await (Stream a)) m (Either SomeException (b, Stream a))Source

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

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

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