Data.Enumerator.Trans

enumerator-0.4.20: Reliable, high-performance processing with left-fold enumerators

Copyright | 2011 Mikhail Vorozhtsov
License | MIT
Maintainer | jmillikin@gmail.com
Portability | portable
Safe Haskell | Safe
Language | Haskell98

Data.Enumerator.Trans

Contents

- IdentityT
- MaybeT
- ErrorT
- ReaderT
- StateT
  - Lazy
  - Strict
- WriterT
  - Lazy
  - Strict
- RWST
  - Lazy
  - Strict

Description

This module provides functions for running monad transformers within iteratees. Most types defined in the "transformers" library are supported.

Functions suffixed with an apostrophe (`'`) apply to the strict variant of their transformer type.

Since: 0.4.16

Synopsis

- runIdentityI :: Monad m => Iteratee a (IdentityT m) b -> Iteratee a m b
- runMaybeI :: Monad m => Iteratee a (MaybeT m) b -> Iteratee a m (Maybe b)
- runErrorI :: (Error e, Monad m) => Iteratee a (ErrorT e m) b -> Iteratee a m (Either e b)
- runReaderI :: Monad m => r -> Iteratee a (ReaderT r m) b -> Iteratee a m b
- runStateI :: Monad m => s -> Iteratee a (StateT s m) b -> Iteratee a m (b, s)
- evalStateI :: Monad m => s -> Iteratee a (StateT s m) b -> Iteratee a m b
- runStateI' :: Monad m => s -> Iteratee a (StateT s m) b -> Iteratee a m (b, s)
- evalStateI' :: Monad m => s -> Iteratee a (StateT s m) b -> Iteratee a m b
- runWriterI :: (Monoid w, Monad m) => Iteratee a (WriterT w m) b -> Iteratee a m (b, w)
- execWriterI :: (Monoid w, Monad m) => Iteratee a (WriterT w m) b -> Iteratee a m w
- runWriterI' :: (Monoid w, Monad m) => Iteratee a (WriterT w m) b -> Iteratee a m (b, w)
- execWriterI' :: (Monoid w, Monad m) => Iteratee a (WriterT w m) b -> Iteratee a m w
- runRWSI :: (Monoid w, Monad m) => r -> s -> Iteratee a (RWST r w s m) b -> Iteratee a m (b, s, w)
- evalRWSI :: (Monoid w, Monad m) => r -> s -> Iteratee a (RWST r w s m) b -> Iteratee a m (b, w)
- execRWSI :: (Monoid w, Monad m) => r -> s -> Iteratee a (RWST r w s m) b -> Iteratee a m (s, w)
- runRWSI' :: (Monoid w, Monad m) => r -> s -> Iteratee a (RWST r w s m) b -> Iteratee a m (b, s, w)
- evalRWSI' :: (Monoid w, Monad m) => r -> s -> Iteratee a (RWST r w s m) b -> Iteratee a m (b, w)
- execRWSI' :: (Monoid w, Monad m) => r -> s -> Iteratee a (RWST r w s m) b -> Iteratee a m (s, w)

# IdentityT

runIdentityI :: Monad m => Iteratee a (IdentityT m) b -> Iteratee a m b

Lifted version of `runIdentityT`

Since: 0.4.16

# MaybeT

runMaybeI :: Monad m => Iteratee a (MaybeT m) b -> Iteratee a m (Maybe b)

Lifted version of `runMaybeT`

Since: 0.4.16

# ErrorT

runErrorI :: (Error e, Monad m) => Iteratee a (ErrorT e m) b -> Iteratee a m (Either e b)

Lifted version of `runErrorT`

Since: 0.4.16

# ReaderT

runReaderI :: Monad m => r -> Iteratee a (ReaderT r m) b -> Iteratee a m b

Lifted version of `runReaderT`

Since: 0.4.16

# StateT

## Lazy

runStateI :: Monad m => s -> Iteratee a (StateT s m) b -> Iteratee a m (b, s)

Lifted version of (lazy) `runStateT`

Since: 0.4.16

evalStateI :: Monad m => s -> Iteratee a (StateT s m) b -> Iteratee a m b

Lifted version of (lazy) `evalStateT`

Since: 0.4.16

## Strict

runStateI' :: Monad m => s -> Iteratee a (StateT s m) b -> Iteratee a m (b, s)

Lifted version of (strict) `runStateT`

Since: 0.4.16

evalStateI' :: Monad m => s -> Iteratee a (StateT s m) b -> Iteratee a m b

Lifted version of (strict) `evalStateT`

Since: 0.4.16

# WriterT

## Lazy

runWriterI :: (Monoid w, Monad m) => Iteratee a (WriterT w m) b -> Iteratee a m (b, w)

Lifted version of (lazy) `runWriterT`

Since: 0.4.16

execWriterI :: (Monoid w, Monad m) => Iteratee a (WriterT w m) b -> Iteratee a m w

Lifted version of (lazy) `execWriterT`

Since: 0.4.16

## Strict

runWriterI' :: (Monoid w, Monad m) => Iteratee a (WriterT w m) b -> Iteratee a m (b, w)

Lifted version of (strict) `runWriterT`

Since: 0.4.16

execWriterI' :: (Monoid w, Monad m) => Iteratee a (WriterT w m) b -> Iteratee a m w

Lifted version of (strict) `execWriterT`

Since: 0.4.16

# RWST

## Lazy

runRWSI :: (Monoid w, Monad m) => r -> s -> Iteratee a (RWST r w s m) b -> Iteratee a m (b, s, w)

Lifted version of (lazy) `runRWST`

Since: 0.4.16

evalRWSI :: (Monoid w, Monad m) => r -> s -> Iteratee a (RWST r w s m) b -> Iteratee a m (b, w)

Lifted version of (lazy) `evalRWST`

Since: 0.4.16

execRWSI :: (Monoid w, Monad m) => r -> s -> Iteratee a (RWST r w s m) b -> Iteratee a m (s, w)

Lifted version of (lazy) `execRWST`

Since: 0.4.16

## Strict

runRWSI' :: (Monoid w, Monad m) => r -> s -> Iteratee a (RWST r w s m) b -> Iteratee a m (b, s, w)

Lifted version of (strict) `runRWST`

Since: 0.4.16

evalRWSI' :: (Monoid w, Monad m) => r -> s -> Iteratee a (RWST r w s m) b -> Iteratee a m (b, w)

Lifted version of (strict) `evalRWST`

Since: 0.4.16

execRWSI' :: (Monoid w, Monad m) => r -> s -> Iteratee a (RWST r w s m) b -> Iteratee a m (s, w)

Lifted version of (strict) `execRWST`

Since: 0.4.16