gore-and-ash-logging-2.0.0.0: Core module for gore-and-ash with logging utilities

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

Game.GoreAndAsh.Logging.Module

Description

Contains description of logging monad transformer and instance for GameModule class.

Synopsis

Documentation

newtype LoggingT s m a Source

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

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

The module is pure within first phase (see ModuleStack docs) and could be used with Identity end monad.

Constructors

LoggingT 

Fields

runLoggingT :: StateT (LoggingState s) m a