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 # catchError :: ComposeT f g m a -> (e -> ComposeT f g m a) -> ComposeT f g m a # | |
(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 # | |
Defined in Control.Monad.Trans.Compose | |
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 # | |
Defined in Control.Monad.Trans.Compose | |
Applicative (f (g m)) => Applicative (ComposeT f g m) Source # | |
Defined in Control.Monad.Trans.Compose pure :: a -> ComposeT f g m a # (<*>) :: ComposeT f g m (a -> b) -> ComposeT f g m a -> ComposeT f g m b # liftA2 :: (a -> b -> c) -> ComposeT f g m a -> ComposeT f g m b -> ComposeT f g m c # (*>) :: ComposeT f g m a -> ComposeT f g m b -> ComposeT f g m b # (<*) :: ComposeT f g m a -> ComposeT f g m b -> ComposeT f g m a # | |
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 # foldMap :: Monoid m0 => (a -> m0) -> ComposeT f g m a -> m0 # foldMap' :: Monoid m0 => (a -> m0) -> ComposeT f g m a -> m0 # foldr :: (a -> b -> b) -> b -> ComposeT f g m a -> b # foldr' :: (a -> b -> b) -> b -> ComposeT f g m a -> b # foldl :: (b -> a -> b) -> b -> ComposeT f g m a -> b # foldl' :: (b -> a -> b) -> b -> ComposeT f g m a -> b # foldr1 :: (a -> a -> a) -> ComposeT f g m a -> a # foldl1 :: (a -> a -> a) -> ComposeT f g m a -> a # toList :: ComposeT f g m a -> [a] # null :: ComposeT f g m a -> Bool # length :: ComposeT f g m a -> Int # elem :: Eq a => a -> ComposeT f g m a -> Bool # maximum :: Ord a => ComposeT f g m a -> a # minimum :: Ord a => ComposeT f g m a -> a # | |
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) # sequenceA :: Applicative f0 => ComposeT f g m (f0 a) -> f0 (ComposeT f g m a) # mapM :: Monad m0 => (a -> m0 b) -> ComposeT f g m a -> m0 (ComposeT f g m b) # sequence :: Monad m0 => ComposeT f g m (m0 a) -> m0 (ComposeT f g m a) # | |
MonadIO (f (g m)) => MonadIO (ComposeT f g m) Source # | |
Defined in Control.Monad.Trans.Compose | |
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 # (<) :: ComposeT f g m a -> ComposeT f g m a -> Bool # (<=) :: ComposeT f g m a -> ComposeT f g m a -> Bool # (>) :: ComposeT f g m a -> ComposeT f g m a -> Bool # (>=) :: ComposeT f g m a -> ComposeT f g m a -> Bool # max :: ComposeT f g m a -> ComposeT f g m a -> ComposeT f g m a # min :: ComposeT f g m a -> ComposeT f g m a -> ComposeT f g m a # | |
Read (f (g m) a) => Read (ComposeT f g m a) Source # | |
Show (f (g m) a) => Show (ComposeT f g m a) Source # | |