source.mli 576 B

12345678910111213141516171819202122232425262728293031
  1. open Base
  2. type source
  3. type value = int
  4. include Comparator.S with type t = source
  5. val time : source
  6. val create : unit -> source
  7. val equal : t -> t -> bool
  8. val compare : t -> t -> int
  9. val to_string : t -> string
  10. type set = (t, comparator_witness) Set.t
  11. type 'a map = (t, 'a, comparator_witness) Map.t
  12. val empty_set : set
  13. val empty_map : 'a map
  14. val singleton : t -> set
  15. module Private : sig
  16. val next_id : diff:int -> t
  17. end
  18. module State : sig
  19. type t
  20. val empty : t
  21. val of_time : int -> t
  22. val get_exn : source -> t -> value
  23. val set : source -> value -> t -> t
  24. end