package tiny_libs

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module FsmSource

Sourcetype ('state, 'context) rule = {
  1. from : 'state;
  2. label : string;
  3. guard : 'context -> int -> bool;
  4. target : 'state;
}
Sourcetype ('state, 'context) machine = ('state, 'context) rule list
Sourcetype 'state run = {
  1. state : 'state;
  2. since : int;
  3. fired : string option;
}
Sourceval start : 'state -> 'state run
Sourceval step : ('state, 'context) machine -> 'context -> 'state run -> 'state run
Sourceval after : int -> 'context -> int -> bool
Sourceval states : ('state, 'context) machine -> 'state list