|
|
|
Description |
A simple event mechanism
|
|
Synopsis |
|
|
|
Documentation |
|
|
Every event needs a selector, which should identify the type of event
|
|
|
|
Every event needs to know its selector and its source
| | Methods | getSelector :: beta -> delta | Source |
|
|
|
|
class (Monad gamma, Event beta delta) => EventSource alpha beta gamma delta | alpha -> beta, alpha -> gamma where | Source |
|
Everything which is an event source needs this
| | Methods | | | | | | | | Reimplement this in instances to make triggering of events possible
| | triggerEvent :: alpha -> beta -> gamma beta | Source |
| Returns the event, so that you may get values back from an event
| | | use Left to register and Right to unregister
returns Unique if registration was successfull, else Nothing
|
|
|
|
type Handlers beta gamma delta = Map delta [(Unique, beta -> gamma beta)] | Source |
|
This shows the implementation of the event mechnism
|
|
Produced by Haddock version 2.6.0 |