Copyright | (c) Ivan Lazar Miljenovic |
---|---|
License | 3-Clause BSD-style |
Maintainer | Ivan.Miljenovic@gmail.com |
Safe Haskell | None |
Language | Haskell2010 |
- type HasTransformer t m = (SatisfyConstraint (IsTransformer t) m, MonadLevel (TransformedMonad t m), TransformedMonad t m ~ t (LowerMonad (TransformedMonad t m)))
- type TransformedMonad t m = SatMonad (IsTransformer t) m
- liftT :: HasTransformer t m => TransformedMonad t m a -> m a
- class (MonadLevel m, m ~ t (LowerMonad m), t (LowerMonad m) ~ m) => IsTransformer t m
Documentation
type HasTransformer t m = (SatisfyConstraint (IsTransformer t) m, MonadLevel (TransformedMonad t m), TransformedMonad t m ~ t (LowerMonad (TransformedMonad t m))) Source
Unlike HasBaseMonad
, this is not a universal constraint
applicable to all MonadLevel
instances, as otherwise it can be
used to bypass the lack of an allowed constraint.
type TransformedMonad t m = SatMonad (IsTransformer t) m Source
The sub-part of the monadic stack where the requested transformer is on top.
liftT :: HasTransformer t m => TransformedMonad t m a -> m a Source
Exported for use with custom instances
class (MonadLevel m, m ~ t (LowerMonad m), t (LowerMonad m) ~ m) => IsTransformer t m Source
(MonadLevel m, (~) (* -> *) m (t (LowerMonad m)), (~) (* -> *) (t (LowerMonad m)) m) => IsTransformer t m | |
ValidConstraint (IsTransformer t) | |
MonadLevel m => ConstraintPassThrough (IsTransformer (ExceptT e)) (ListT m) True | |
MonadLevel m => ConstraintPassThrough (IsTransformer (StateT s)) (ListT m) True | |
MonadLevel m => ConstraintPassThrough (IsTransformer (StateT s)) (ListT m) True | |
MonadLevel m => ConstraintPassThrough (IsTransformer (ReaderT r)) (ListT m) True | |
MonadLevel m => ConstraintPassThrough (IsTransformer (ContT r)) (ListT m) True | |
MonadLevel m => ConstraintPassThrough (IsTransformer (StateT s)) (ContT r m) True | |
MonadLevel m => ConstraintPassThrough (IsTransformer (StateT s)) (ContT r m) True | |
MonadLevel m => ConstraintPassThrough (IsTransformer (ReaderT r)) (ContT c m) True | |
type ConstraintSatisfied (IsTransformer t) m |