Monatron-0.3: Monad transformer library with uniform liftingsContentsIndex
Monatron.Operations
Documentation
type ExtModel f g m = forall a. f (m (g a)) -> m a
type Model f m = forall a. f (m a) -> m a
type AlgModel f m = forall a. f a -> m a
toAlg :: (Functor f, Monad m) => Model f m -> AlgModel f (Codensity m)
liftModel :: (Functor f, Monad m, Functor m, FMonadT t, Monad (t (Codensity m))) => Model f m -> Model f (t m)
liftAlgModel :: (MonadT t, Monad m, Functor f) => AlgModel f m -> AlgModel f (t m)
liftExtModel :: (Functor f, Functor g, Monad m, Functor m, MMonadT t, Functor (t f), Functor (t m)) => ExtModel f g m -> ExtModel f g (t m)
data StateOp s a
Constructors
Get (s -> a)
Put s a
show/hide Instances
modelStateT :: Monad m => AlgModel (StateOp s) (StateT s m)
getX :: Monad m => AlgModel (StateOp s) m -> m s
putX :: Monad m => AlgModel (StateOp s) m -> s -> m ()
data ReaderOp s a
Constructors
Ask (s -> a)
InEnv s a
show/hide Instances
modelReaderT :: Monad m => Model (ReaderOp s) (ReaderT s m)
askX :: Monad m => Model (ReaderOp s) m -> m s
inEnvX :: Monad m => Model (ReaderOp s) m -> s -> m a -> m a
localX :: Monad m => Model (ReaderOp z) m -> (z -> z) -> m a -> m a
data WriterOp w a
Constructors
Trace w a
show/hide Instances
modelWriterT :: (Monad m, Monoid w) => AlgModel (WriterOp w) (WriterT w m)
traceX :: Monad m => AlgModel (WriterOp w) m -> w -> m ()
data ThrowOp x a
Constructors
Throw x
show/hide Instances
data HandleOp x a
Constructors
Handle a (x -> a)
show/hide Instances
modelThrowExcT :: Monad m => AlgModel (ThrowOp x) (ExcT x m)
modelHandleExcT :: Monad m => Model (HandleOp x) (ExcT x m)
modelThrowIO :: AlgModel (ThrowOp SomeException) IO
modelHandleIO :: Model (HandleOp SomeException) IO
throwX :: Monad m => AlgModel (ThrowOp x) m -> x -> m a
handleX :: Monad m => Model (HandleOp x) m -> m a -> (x -> m a) -> m a
data ContOp r a
Constructors
Abort r
CallCC ((a -> r) -> a)
show/hide Instances
modelContT :: Monad m => AlgModel (ContOp (m r)) (ContT r m)
callccX :: Monad m => AlgModel (ContOp r) m -> ((a -> m b) -> m a) -> m a
callCCX :: Monad m => AlgModel (ContOp r) m -> ((a -> r) -> a) -> m a
abortX :: Monad m => AlgModel (ContOp r) m -> r -> m a
newtype StepOp f x
Constructors
StepOp (f x)
show/hide Instances
stepX :: Monad m => Model (StepOp f) m -> f (m x) -> m x
modelStepT :: (Functor f, Monad m) => Model (StepOp f) (StepT f m)
data ListOp a
Constructors
ZeroList
PlusList a a
show/hide Instances
modelListT :: Monad m => AlgModel ListOp (ListT m)
zeroListX :: Monad m => AlgModel ListOp m -> m a
plusListX :: Monad m => AlgModel ListOp m -> m a -> m a -> m a
module Monatron.Transformer
Produced by Haddock version 2.4.2