gore-and-ash-glfw-1.1.1.0: Core module for Gore&Ash engine for GLFW input events

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

Game.GoreAndAsh.GLFW.Module

Description

The module contains declaration of monad transformer of the core module and instance for GameModule class.

Synopsis

Documentation

newtype GLFWT s m a Source

Monad transformer that handles GLFW specific API

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 [GLFWT, ... other modules ... ] IO

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

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

Constructors

GLFWT 

Fields

runGLFWT :: StateT (GLFWState s) m a
 

Instances

MonadTrans (GLFWT s) Source 
Monad m => MonadState (GLFWState s) (GLFWT s m) Source 
Monad m => Monad (GLFWT s m) Source 
Functor m => Functor (GLFWT s m) Source 
MonadFix m => MonadFix (GLFWT s m) Source 
Monad m => Applicative (GLFWT s m) Source 
MonadIO m => MonadIO (GLFWT s m) Source 
MonadThrow m => MonadThrow (GLFWT s m) Source 
MonadMask m => MonadMask (GLFWT s m) Source 
MonadCatch m => MonadCatch (GLFWT s m) Source 
Monad m => MonadGLFW (GLFWT s m) Source 
type ModuleState (GLFWT s m) = GLFWState s Source