eve-0.1.8: An extensible event framework

Safe HaskellNone




data AppState Source #

A basic default state which underlies App Contains only a map of States.




type App a = AppT AppState IO a Source #

An App is a base level monad which operates over your main application state. You may call runAction inside an app to run Actions over other states.

type Action state a = ActionT AppState state IO a Source #

An Action is a monad over some zoomed in state, they are run inside App using runAction. For example an Action which operates over a String somewhere in your app state would be written as:

alterString :: 'Action' String ()

type ActionM s m a = ActionT AppState s m a Source #

A more general version of Action which lets you to specify the underlying monad.

type AppM m a = AppT AppState m a Source #

A more general version of App which lets you specify the underlying monad.

exit :: (Monad m, HasStates s) => ActionT s zoomed m () Source #

Tells the application to quit. This triggers onExit listeners following the current event loop.

isExiting :: (Monad m, HasStates s) => ActionT s zoomed m Bool Source #

Checks whether we're in the process of exiting.

asyncQueue :: (HasStates s, Typeable m, Typeable base) => Lens' s (Maybe (Chan (AppT base m ()))) Source #

Accesses a queue for dispatching async actions.