Copyright | (c) Anton Gushcha, 2015-2016 |
---|---|
License | BSD3 |
Maintainer | ncrashed@gmail.com |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
The module contains declaration of module monad transformer and instance of GameModule
.
- newtype NetworkT s m a = NetworkT {
- runNetworkT :: StateT (NetworkState s) m a
Documentation
newtype NetworkT s m a Source #
Monad transformer of network core module.
s
- - State of next core module in modules chain;
m
- - Next monad in modules monad stack;
a
- - Type of result value;
How to embed module:
type AppStack = ModuleStack [LoggingT, NetworkT, ... other modules ... ] IO newtype AppMonad a = AppMonad (AppStack a) deriving (Functor, Applicative, Monad, MonadFix, MonadIO, LoggingMonad, NetworkMonad)
The module is NOT pure within first phase (see ModuleStack
docs), therefore currently only IO
end monad can handler the module.
NetworkT | |
|
MonadBase IO m => MonadBase IO (NetworkT s m) Source # | |
MonadError e m => MonadError e (NetworkT s m) Source # | |
MonadTrans (NetworkT s) Source # | |
Monad m => MonadState (NetworkState s) (NetworkT s m) Source # | |
Monad m => Monad (NetworkT s m) Source # | |
Functor m => Functor (NetworkT s m) Source # | |
MonadFix m => MonadFix (NetworkT s m) Source # | |
Monad m => Applicative (NetworkT s m) Source # | |
MonadIO m => MonadIO (NetworkT s m) Source # | |
MonadThrow m => MonadThrow (NetworkT s m) Source # | |
MonadMask m => MonadMask (NetworkT s m) Source # | |
MonadCatch m => MonadCatch (NetworkT s m) Source # | |
MonadResource m => MonadResource (NetworkT s m) Source # | |
(MonadIO m, MonadCatch m) => NetworkMonad (NetworkT s m) Source # | |
type ModuleState (NetworkT s m) Source # | |
Orphan instances
GameModule m s => GameModule (NetworkT s m) (NetworkState s) Source # | |