mzv-0.1.0.1: Implementation of the "Monads, Zippers and Views" (Schrijvers and Oliveira, ICFP'11)

Copyright(c) Andy Gill 2001, (c) Oregon Graduate Institute of Science and Technology, 2001
LicenseBSD-style (see the file libraries/base/LICENSE)
Maintainerlibraries@haskell.org
Stabilityexperimental
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell98

Control.Monad.Trans

Description

The MonadTrans class.

Inspired by the paper /Functional Programming with Overloading and Higher-Order Polymorphism/, Mark P Jones (http://web.cecs.pdx.edu/~mpj/) Advanced School of Functional Programming, 1995.

Documentation

class MonadTrans t where Source

Minimal complete definition

lift, mt, unlift

Methods

lift :: Monad m => m a -> t m a Source

mt :: Monad m => Transformation t m Source

unlift :: (Monad m, Monad n) => (forall f. Functor f => (forall x. t m x -> m (f x)) -> n (f a)) -> t n a Source

tmixmap :: (Monad m, Monad n) => (forall a. m a -> n a) -> t m c -> t n c Source

class Monad m => MonadIO m where Source

Methods

liftIO :: IO a -> m a Source

Instances

MonadIO IO 
MonadIO m => MonadIO (ListT m) 
MonadIO m => MonadIO (StateT s m) 
MonadIO m => MonadIO (StateT s m) 
(Monoid w, MonadIO m) => MonadIO (WriterT w m) 
MonadIO m => MonadIO (ReaderT r m) 
(Error e, MonadIO m) => MonadIO (ErrorT e m) 
(Monoid w, MonadIO m) => MonadIO (WriterT w m) 
MonadIO m => MonadIO (ContT r m) 
(Monoid w, MonadIO m) => MonadIO (RWST r w s m) 
(Monoid w, MonadIO m) => MonadIO (RWST r w s m) 

data Transformation t m where Source

Constructors

MT :: Monad (t m) => Transformation t m 

tmap :: (MonadTrans t, Monad m, Monad n) => (forall a. m a -> n a) -> t m c -> t n c Source