|
Control.Hasim | Portability | unportable | Stability | experimental | Maintainer | jochem@functor.nl |
|
|
|
|
|
Description |
This module imports all relevant functions from Control.Hasim.*
hiding implementation details.
|
|
Synopsis |
|
|
|
|
Types
|
|
|
The type that represents a time.
The type that represents a process identifier.
|
|
|
|
Simulation
|
|
|
Data type representing a simulation.
|
|
|
|
The simulation monad called SimMonad. In this
monad you can define a simulation to be run.
|
|
|
Make an anonymous process.
|
|
|
:: | | => String | The name of the new process.
| -> st | The initial state of the process.
| -> SimMonad (Proc pkt st) | | Make a process with a name. This name will be used
in logging and error messages
|
|
|
|
:: | | => Proc pkt st | The process of which the action should be set
| -> Action pkt st () | The action to be set
| -> SimMonad () | | Set the action of the process.
|
|
|
|
Create a simulation from a SimMonad (a simulation definition).
If the simulation is invalid, error will be called.
|
|
Process
|
|
|
A Proc st pkt is a process that potentially accepts packets of type
pkt while maintaining state st.
| Instances | |
|
|
|
An acceptor of a pkt is an AcceptResult, which is either
* Refuse if the packet is to be delivered at a later time, or
never, of course
* Parallel act if a current computation should not be suspended,
but the state should be changed.
* Interrupt act if the current computation should be suspended.
|
|
|
Existential type for a Proc. A Process is a Proc pkt
for some pkt.
| Instances | |
|
|
|
The Action GADT. This is a GADT with three
parameters; an Action pkt st a is a action where
* pkt denotes the packet type of incoming packets
* st denotes the state that can be modified
and inspected
* a denotes the result value of the Action
| Instances | |
|
|
data AcceptResult pkt st | Source |
|
The type of result of the Acceptor
| Constructors | Refuse | | Parallel (st -> st) | | Interrupt (Action pkt st ()) | |
|
|
|
Actions
|
|
module Control.Hasim.Action |
|
SimRun
|
|
|
Run the simulation.
|
|
Produced by Haddock version 2.3.0 |