gore-and-ash-actor-1.1.1.0: Gore&Ash engine extension that implements actor style of programming

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

Game.GoreAndAsh.Actor.Module

Description

The module contains monad transformer for actor core module and instance of GameModule for it.

Synopsis

Documentation

newtype ActorT s m a Source

Monad transformer of actor 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 [ActorT, ... other modules ... ] IO

newtype AppMonad a = AppMonad (AppStack a)
  deriving (Functor, Applicative, Monad, MonadFix, MonadIO, ActorMonad)

The module is pure within first phase (see ModuleStack docs) but requires MonadThrow instance of end monad, therefore currently only IO end monad can handler the module.

Constructors

ActorT 

Fields

runActorT :: StateT (ActorState s) m a
 

Instances

MonadTrans (ActorT s) Source 
Monad m => MonadState (ActorState s) (ActorT s m) Source 
Monad m => Monad (ActorT s m) Source 
Functor m => Functor (ActorT s m) Source 
MonadFix m => MonadFix (ActorT s m) Source 
Monad m => Applicative (ActorT s m) Source 
MonadIO m => MonadIO (ActorT s m) Source 
MonadThrow m => MonadThrow (ActorT s m) Source 
MonadMask m => MonadMask (ActorT s m) Source 
MonadCatch m => MonadCatch (ActorT s m) Source 
MonadThrow m => ActorMonad (ActorT s m) Source 
type ModuleState (ActorT s m) = ActorState s Source