Copyright | (c) Samuel Schlesinger 2020 |
---|---|
License | MIT |
Maintainer | sgschlesinger@gmail.com |
Stability | experimental |
Portability | POSIX, Windows |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- newtype Stack (ts :: [(* -> *) -> * -> *]) (m :: * -> *) a = Stack {}
- type family Stack' (ts :: [(* -> *) -> * -> *]) (m :: * -> *) :: * -> * where ...
- type family Substack n ts f where ...
- data N
- class (n :: N) > (m :: N)
- class Uplift n ts f where
- type family IndexIn t ts where ...
- liftSubstack :: forall t ts f a. Uplift (IndexIn t ts) ts f => Substack (IndexIn t ts) ts f a -> Stack ts f a
Documentation
newtype Stack (ts :: [(* -> *) -> * -> *]) (m :: * -> *) a Source #
A computation consisting of a stack of monad transformers and a base monad.
Instances
(forall (f' :: Type -> Type). Monad f' => Monad (t f'), MonadTrans t, forall (f' :: Type -> Type). Monad f' => Monad (Stack ts f'), MonadTrans (Stack ts)) => MonadTrans (Stack (t ': ts)) Source # | |
Defined in Control.Monad.Trans.Stack | |
MonadTrans (Stack ([] :: [(Type -> Type) -> Type -> Type])) Source # | |
Defined in Control.Monad.Trans.Stack | |
(forall (f' :: Type -> Type). Monad f' => Monad (t f'), MonadTrans t, Monad f, Monad (Stack ts f)) => Monad (Stack (t ': ts) f) Source # | |
Monad f => Monad (Stack ([] :: [(Type -> Type) -> Type -> Type]) f) Source # | |
(forall (f' :: Type -> Type). Monad f' => Monad (t f'), Monad f, Monad (Stack ts f)) => Functor (Stack (t ': ts) f) Source # | |
Functor f => Functor (Stack ([] :: [(Type -> Type) -> Type -> Type]) f) Source # | |
(forall (f' :: Type -> Type). Monad f' => Monad (t f'), Monad f, Monad (Stack ts f)) => Applicative (Stack (t ': ts) f) Source # | |
Defined in Control.Monad.Trans.Stack pure :: a -> Stack (t ': ts) f a # (<*>) :: Stack (t ': ts) f (a -> b) -> Stack (t ': ts) f a -> Stack (t ': ts) f b # liftA2 :: (a -> b -> c) -> Stack (t ': ts) f a -> Stack (t ': ts) f b -> Stack (t ': ts) f c # (*>) :: Stack (t ': ts) f a -> Stack (t ': ts) f b -> Stack (t ': ts) f b # (<*) :: Stack (t ': ts) f a -> Stack (t ': ts) f b -> Stack (t ': ts) f a # | |
Applicative f => Applicative (Stack ([] :: [(Type -> Type) -> Type -> Type]) f) Source # | |
Defined in Control.Monad.Trans.Stack |
type family Stack' (ts :: [(* -> *) -> * -> *]) (m :: * -> *) :: * -> * where ... Source #
The type family which we interleave with Stack
for its implementation.
type family Substack n ts f where ... Source #
Computes a substack, or a suffix, of the given stack of monad transformers.
class Uplift n ts f where Source #
A type family used to lift substacks up into the full Stack
computation.