mmorph-1.2.0: Monad morphisms
Safe Haskell Trustworthy
Language Haskell2010

Control.Monad.Trans.Compose

Contents

Description

Composition of monad transformers. A higher-order version of Data.Functor.Compose .

Synopsis

ComposeT

newtype ComposeT (f :: (* -> *) -> * -> *) (g :: (* -> *) -> * -> *) m a infixr 9 Source #

Composition of monad transformers.

Constructors

ComposeT infixr 9

Fields

Instances

Instances details
( MonadReader r (f (g m)), MonadWriter w (f (g m)), MonadState s (f (g m))) => MonadRWS r w s ( ComposeT f g m) Source #
Instance details

Defined in Control.Monad.Trans.Compose

MonadWriter w (f (g m)) => MonadWriter w ( ComposeT f g m) Source #
Instance details

Defined in Control.Monad.Trans.Compose

Methods

writer :: (a, w) -> ComposeT f g m a Source #

tell :: w -> ComposeT f g m () Source #

listen :: ComposeT f g m a -> ComposeT f g m (a, w) Source #

pass :: ComposeT f g m (a, w -> w) -> ComposeT f g m a Source #

MonadState s (f (g m)) => MonadState s ( ComposeT f g m) Source #
Instance details

Defined in Control.Monad.Trans.Compose

MonadReader r (f (g m)) => MonadReader r ( ComposeT f g m) Source #
Instance details

Defined in Control.Monad.Trans.Compose

Methods

ask :: ComposeT f g m r Source #

local :: (r -> r) -> ComposeT f g m a -> ComposeT f g m a Source #

reader :: (r -> a) -> ComposeT f g m a Source #

MonadError e (f (g m)) => MonadError e ( ComposeT f g m) Source #
Instance details

Defined in Control.Monad.Trans.Compose

( MFunctor f, MFunctor g, forall (m :: Type -> Type ). Monad m => Monad (g m)) => MFunctor ( ComposeT f g :: ( Type -> Type ) -> Type -> Type ) Source #
Instance details

Defined in Control.Monad.Trans.Compose

Methods

hoist :: forall m n (b :: k). Monad m => ( forall a. m a -> n a) -> ComposeT f g m b -> ComposeT f g n b Source #

( MFunctor f, MonadTrans f, MonadTrans g) => MonadTrans ( ComposeT f g) Source #
Instance details

Defined in Control.Monad.Trans.Compose

Methods

lift :: Monad m => m a -> ComposeT f g m a Source #

Monad (f (g m)) => Monad ( ComposeT f g m) Source #
Instance details

Defined in Control.Monad.Trans.Compose

Functor (f (g m)) => Functor ( ComposeT f g m) Source #
Instance details

Defined in Control.Monad.Trans.Compose

Methods

fmap :: (a -> b) -> ComposeT f g m a -> ComposeT f g m b Source #

(<$) :: a -> ComposeT f g m b -> ComposeT f g m a Source #

MonadFail (f (g m)) => MonadFail ( ComposeT f g m) Source #
Instance details

Defined in Control.Monad.Trans.Compose

Applicative (f (g m)) => Applicative ( ComposeT f g m) Source #
Instance details

Defined in Control.Monad.Trans.Compose

Methods

pure :: a -> ComposeT f g m a Source #

(<*>) :: ComposeT f g m (a -> b) -> ComposeT f g m a -> ComposeT f g m b Source #

liftA2 :: (a -> b -> c) -> ComposeT f g m a -> ComposeT f g m b -> ComposeT f g m c Source #

(*>) :: ComposeT f g m a -> ComposeT f g m b -> ComposeT f g m b Source #

(<*) :: ComposeT f g m a -> ComposeT f g m b -> ComposeT f g m a Source #

Foldable (f (g m)) => Foldable ( ComposeT f g m) Source #
Instance details

Defined in Control.Monad.Trans.Compose

Methods

fold :: Monoid m0 => ComposeT f g m m0 -> m0 Source #

foldMap :: Monoid m0 => (a -> m0) -> ComposeT f g m a -> m0 Source #

foldMap' :: Monoid m0 => (a -> m0) -> ComposeT f g m a -> m0 Source #

foldr :: (a -> b -> b) -> b -> ComposeT f g m a -> b Source #

foldr' :: (a -> b -> b) -> b -> ComposeT f g m a -> b Source #

foldl :: (b -> a -> b) -> b -> ComposeT f g m a -> b Source #

foldl' :: (b -> a -> b) -> b -> ComposeT f g m a -> b Source #

foldr1 :: (a -> a -> a) -> ComposeT f g m a -> a Source #

foldl1 :: (a -> a -> a) -> ComposeT f g m a -> a Source #

toList :: ComposeT f g m a -> [a] Source #

null :: ComposeT f g m a -> Bool Source #

length :: ComposeT f g m a -> Int Source #

elem :: Eq a => a -> ComposeT f g m a -> Bool Source #

maximum :: Ord a => ComposeT f g m a -> a Source #

minimum :: Ord a => ComposeT f g m a -> a Source #

sum :: Num a => ComposeT f g m a -> a Source #

product :: Num a => ComposeT f g m a -> a Source #

Traversable (f (g m)) => Traversable ( ComposeT f g m) Source #
Instance details

Defined in Control.Monad.Trans.Compose

Methods

traverse :: Applicative f0 => (a -> f0 b) -> ComposeT f g m a -> f0 ( ComposeT f g m b) Source #

sequenceA :: Applicative f0 => ComposeT f g m (f0 a) -> f0 ( ComposeT f g m a) Source #

mapM :: Monad m0 => (a -> m0 b) -> ComposeT f g m a -> m0 ( ComposeT f g m b) Source #

sequence :: Monad m0 => ComposeT f g m (m0 a) -> m0 ( ComposeT f g m a) Source #

MonadIO (f (g m)) => MonadIO ( ComposeT f g m) Source #
Instance details

Defined in Control.Monad.Trans.Compose

Alternative (f (g m)) => Alternative ( ComposeT f g m) Source #
Instance details

Defined in Control.Monad.Trans.Compose

MonadPlus (f (g m)) => MonadPlus ( ComposeT f g m) Source #
Instance details

Defined in Control.Monad.Trans.Compose

MonadCont (f (g m)) => MonadCont ( ComposeT f g m) Source #
Instance details

Defined in Control.Monad.Trans.Compose

Methods

callCC :: ((a -> ComposeT f g m b) -> ComposeT f g m a) -> ComposeT f g m a Source #

Eq (f (g m) a) => Eq ( ComposeT f g m a) Source #
Instance details

Defined in Control.Monad.Trans.Compose

Ord (f (g m) a) => Ord ( ComposeT f g m a) Source #
Instance details

Defined in Control.Monad.Trans.Compose

Read (f (g m) a) => Read ( ComposeT f g m a) Source #
Instance details

Defined in Control.Monad.Trans.Compose

Show (f (g m) a) => Show ( ComposeT f g m a) Source #
Instance details

Defined in Control.Monad.Trans.Compose

mapComposeT :: (f (g m) a -> p (q n) b) -> ComposeT f g m a -> ComposeT p q n b Source #

Transform the computation inside a ComposeT .