Safe Haskell | Trustworthy |
---|---|
Language | Haskell2010 |
Composition of monad transformers. A higher-order version of Data.Functor.Compose .
Synopsis
-
newtype
ComposeT
(f :: (* -> *) -> * -> *) (g :: (* -> *) -> * -> *) m a =
ComposeT
{
- getComposeT :: f (g m) a
- mapComposeT :: (f (g m) a -> p (q n) b) -> ComposeT f g m a -> ComposeT p q n b
ComposeT
newtype ComposeT (f :: (* -> *) -> * -> *) (g :: (* -> *) -> * -> *) m a infixr 9 Source #
Composition of monad transformers.
ComposeT infixr 9 | |
|
Instances
( MonadReader r (f (g m)), MonadWriter w (f (g m)), MonadState s (f (g m))) => MonadRWS r w s ( ComposeT f g m) Source # | |
Defined in Control.Monad.Trans.Compose |
|
MonadWriter w (f (g m)) => MonadWriter w ( ComposeT f g m) Source # | |
MonadState s (f (g m)) => MonadState s ( ComposeT f g m) Source # | |
MonadReader r (f (g m)) => MonadReader r ( ComposeT f g m) Source # | |
MonadError e (f (g m)) => MonadError e ( ComposeT f g m) Source # | |
Defined in Control.Monad.Trans.Compose throwError :: e -> ComposeT f g m a Source # catchError :: ComposeT f g m a -> (e -> ComposeT f g m a) -> ComposeT f g m a Source # |
|
( MFunctor f, MFunctor g, forall (m :: Type -> Type ). Monad m => Monad (g m)) => MFunctor ( ComposeT f g :: ( Type -> Type ) -> Type -> Type ) Source # | |
( MFunctor f, MonadTrans f, MonadTrans g) => MonadTrans ( ComposeT f g) Source # | |
Monad (f (g m)) => Monad ( ComposeT f g m) Source # | |
Functor (f (g m)) => Functor ( ComposeT f g m) Source # | |
MonadFail (f (g m)) => MonadFail ( ComposeT f g m) Source # | |
Applicative (f (g m)) => Applicative ( ComposeT f g m) Source # | |
Defined in Control.Monad.Trans.Compose 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 # | |
Defined in Control.Monad.Trans.Compose 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 # |
|
Traversable (f (g m)) => Traversable ( ComposeT f g m) Source # | |
Defined in Control.Monad.Trans.Compose 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 # | |
Alternative (f (g m)) => Alternative ( ComposeT f g m) Source # | |
MonadPlus (f (g m)) => MonadPlus ( ComposeT f g m) Source # | |
MonadCont (f (g m)) => MonadCont ( ComposeT f g m) Source # | |
Eq (f (g m) a) => Eq ( ComposeT f g m a) Source # | |
Ord (f (g m) a) => Ord ( ComposeT f g m a) Source # | |
Defined in Control.Monad.Trans.Compose compare :: ComposeT f g m a -> ComposeT f g m a -> Ordering Source # (<) :: ComposeT f g m a -> ComposeT f g m a -> Bool Source # (<=) :: ComposeT f g m a -> ComposeT f g m a -> Bool Source # (>) :: ComposeT f g m a -> ComposeT f g m a -> Bool Source # (>=) :: ComposeT f g m a -> ComposeT f g m a -> Bool Source # max :: ComposeT f g m a -> ComposeT f g m a -> ComposeT f g m a Source # min :: ComposeT f g m a -> ComposeT f g m a -> ComposeT f g m a Source # |
|
Read (f (g m) a) => Read ( ComposeT f g m a) Source # | |
Show (f (g m) a) => Show ( ComposeT f g m a) Source # | |