LambdaHack-0.7.1.0: A game engine library for roguelike dungeon crawlers

Safe HaskellNone
LanguageHaskell2010

Game.LambdaHack.Common.MonadStateRead

Description

Game state reading monad and basic operations.

Synopsis

Documentation

class (Monad m, Functor m, Applicative m) => MonadStateRead m where Source #

Monad for reading game state. A state monad with state modification disallowed (another constraint is needed to permit that). The basic server and client monads are like that, because server and clients freely modify their internal session data, but don't modify the main game state, except in very restricted and synchronized way.

Minimal complete definition

getsState

Methods

getsState :: (State -> a) -> m a Source #