Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- class (Traversable m, MonadException m) => MonadInner m where
- retrieveInner :: forall a. m a -> Result (Exc m) a
- mToMaybe :: forall m a. MonadInner m => m a -> Maybe a
- commuteInner :: forall m f a. (MonadInner m, Applicative f) => m (f a) -> f (m a)
Documentation
class (Traversable m, MonadException m) => MonadInner m where Source #
Monads that can compose as the inner monad with any outer monad to make a monad.
See ComposeInner
.
Instances of this type are isomorphic to Either P (Q,a)
for some types P
and Q
(with Monoid Q
).
Must satisfy:
retrieveInner (fmap f w) = fmap f (retrieveInner w)
case retrieveInner w of {Left w' -> fmap absurd w'; Right a -> fmap (\_ -> a) w;} = w
retrieveInner :: forall a. m a -> Result (Exc m) a Source #
Instances
mToMaybe :: forall m a. MonadInner m => m a -> Maybe a Source #
commuteInner :: forall m f a. (MonadInner m, Applicative f) => m (f a) -> f (m a) Source #