quiver-1.1.3: Quiver finite stream processing library

Copyright© 2015 Patryk Zadarnowski <pat@jantar.org>
LicenseBSD3
Maintainerpat@jantar.org
Stabilityexperimental
Portabilityportable
Safe HaskellSafe
LanguageHaskell2010

Control.Quiver.Trans

Description

This module provides functions for hoisting stream processors over the various well-known monad transformers into the corresponding base monad, in a manner analogous to the tranformers' run function.

This is particularly useful for composing quiver processors over distinct “compatible” monads such as ReaderT and Strict.StateT.

Synopsis

Documentation

qRunErrorT :: Functor m => P a a' b b' (ErrorT e m) r -> P a a' b b' m (Either e r) Source

Hoists a stream processor from an 'ErrorT e m' monad into its base monad m.

qRunExceptT :: Functor m => P a a' b b' (ExceptT e m) r -> P a a' b b' m (Either e r) Source

Hoists a stream processor from an 'ExceptT e m' monad into its base monad m.

qRunMaybeT :: Functor m => P a a' b b' (MaybeT m) r -> P a a' b b' m (Maybe r) Source

Hoists a stream processor from a 'MaybeT m' monad into its base monad m.

qRunRWST :: (Functor m, Monoid mw) => P a a' b b' (Lazy.RWST mr mw ms m) r -> mr -> ms -> P a a' b b' m (r, ms, mw) Source

Hoists a stream processor from a lazy 'RWST r w s m' monad into its base monad m.

qRunLazyRWST :: (Functor m, Monoid mw) => P a a' b b' (Lazy.RWST mr mw ms m) r -> mr -> ms -> P a a' b b' m (r, ms, mw) Source

Hoists a stream processor from a lazy 'RWST r w s m' monad into its base monad m.

qRunStrictRWST :: (Functor m, Monoid mw) => P a a' b b' (Strict.RWST mr mw ms m) r -> mr -> ms -> P a a' b b' m (r, ms, mw) Source

Hoists a stream processor from a strict 'RWST r w s m' monad into its base monad m.

qRunReaderT :: Functor m => P a a' b b' (ReaderT mr m) r -> mr -> P a a' b b' m r Source

Hoists a stream processor from a 'ReaderT r m' monad into its base monad m.

qRunStateT :: Functor m => P a a' b b' (Lazy.StateT ms m) r -> ms -> P a a' b b' m (r, ms) Source

Hoists a stream processor from a lazy 'StateT s m' monad into its base monad m.

qRunLazyStateT :: Functor m => P a a' b b' (Lazy.StateT ms m) r -> ms -> P a a' b b' m (r, ms) Source

Hoists a stream processor from a lazy 'StateT s m' monad into its base monad m.

qRunStrictStateT :: Functor m => P a a' b b' (Strict.StateT ms m) r -> ms -> P a a' b b' m (r, ms) Source

Hoists a stream processor from a strict 'StateT s m' monad into its base monad m.

qRunWriterT :: (Functor m, Monoid mw) => P a a' b b' (Lazy.WriterT mw m) r -> P a a' b b' m (r, mw) Source

Hoists a stream processor from a lazy 'WriterT w m' monad into its base monad m.

qRunLazyWriterT :: (Functor m, Monoid mw) => P a a' b b' (Lazy.WriterT mw m) r -> P a a' b b' m (r, mw) Source

Hoists a stream processor from a lazy 'WriterT w m' monad into its base monad m.

qRunStrictWriterT :: (Functor m, Monoid mw) => P a a' b b' (Strict.WriterT mw m) r -> P a a' b b' m (r, mw) Source

Hoists a stream processor from a strict 'WriterT w m' monad into its base monad m.