gore-and-ash-async-1.0.0.0: Core module for Gore&Ash engine that embeds async IO actions into game loop.

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

Game.GoreAndAsh.Async.Module

Description

 

Synopsis

Documentation

newtype AsyncT s m a Source

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

newtype AppMonad a = AppMonad (AppStack a)
  deriving (Functor, Applicative, Monad, MonadFix, MonadIO, MonadThrow, MonadCatch, MonadAsync)

The module is NOT pure within first phase (see ModuleStack docs), therefore currently only IO end monad can handler the module.

Constructors

AsyncT 

Fields

runAsyncT :: StateT (AsyncState s) m a