Source file intf_std.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
(** Basic module types. *)

(** Totally ordered data *)
module type Ordered = sig
  type t

  val compare : t -> t -> int
end

type 'a printer = Format.formatter -> 'a -> unit

(** Pretty-printable data *)
module type Pp = sig
  type t

  val pp : t printer
end

(** Comparable, printable and hashable data *)
module type Std = sig
  type t

  val compare : t -> t -> int

  val equal : t -> t -> bool

  val pp : t printer

  val hash : t -> int
end