hasim-0.1: Process-Based Discrete Event Simulation librarySource codeContentsIndex
Control.Hasim.WatchMap
Portabilityunportable
Stabilityexperimental
Maintainerjochem@functor.nl
Contents
Abstract data type
Creation and inspection
Modification
Description
This module defines a WatchMap, a data structure that keeps track of which processes watch which other processes.
Synopsis
data WatchMap
emptyWM :: WatchMap
watchers :: WatchMap -> Process -> [Process]
register :: Process -> Process -> WatchMap -> WatchMap
unregister :: Process -> Process -> WatchMap -> WatchMap
Abstract data type
data WatchMap Source
A watch map. This data structure represents a relation on processes.
Creation and inspection
emptyWM :: WatchMapSource
An empty WatchMap.
watchersSource
:: WatchMapThe WatchMap to be queried
-> Process
p2
-> [Process]The list of p1's
Find all p1 such that (p1, p2) is in the relation.
Modification
registerSource
:: Process
p1
-> Process
p2
-> WatchMapold WatchMap
-> WatchMapnew WatchMap
Add the tuple (p1, p2) to the relation.
unregisterSource
:: Process
p1
-> Process
p2
-> WatchMapold WatchMap
-> WatchMapnew WatchMap
Remove the tuple (p1, p2) from the relation, if it existed.
Produced by Haddock version 2.3.0