gore-and-ash-network-1.1.0.0: Core module for Gore&Ash engine with low level network API

Copyright(c) Anton Gushcha, 2015-2016
LicenseBSD3
Maintainerncrashed@gmail.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Game.GoreAndAsh.Network.Module

Description

The module contains declaration of module monad transformer and instance of GameModule.

Synopsis

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.

Constructors

NetworkT 

Fields

runNetworkT :: StateT (NetworkState s) m a