Control.Concurrent.Session.SMonad
Description
Super magic Monads.
- newtype SChain m x y a = SChain {
- runSChain :: x -> m (a, y)
- class SMonad m where
- newtype SStateT s m x y a = SStateT {
- runSStateT :: s -> m x y (a, s)
- class SMonadTrans t where
- class SMonad m => SMonadIO m where
- class SMonad m => SMonadState s m | m -> s where
Documentation
An extension of the typical Monad such that you track additional
from and to parameters. Thus you can think of this like State
where the type of the State varies.
Methods
(~>>) :: m x y a -> m y z b -> m x z bSource
Instances
| Monad m => SMonad (SChain m) | |
| SMonad m => SMonad (SStateT s m) | |
| (Dual prog prog', ProgramToMVarsOutgoing prog progOut, ProgramToMVarsOutgoing prog' progIn) => SMonad (SessionChain prog progOut progIn) |
newtype SStateT s m x y a Source
Constructors
| SStateT | |
Fields
| |
Instances
| SMonad m => SMonadState s (SStateT s m) | |
| SMonadTrans (SStateT s) | |
| SMonad m => SMonad (SStateT s m) |
class SMonadTrans t whereSource
Instances
| SMonadTrans (SStateT s) |
class SMonad m => SMonadIO m whereSource
Instances
| MonadIO m => SMonadIO (SChain m) | |
| (Dual prog prog', ProgramToMVarsOutgoing prog progOut, ProgramToMVarsOutgoing prog' progIn) => SMonadIO (SessionChain prog progOut progIn) |