summaryrefslogtreecommitdiff
path: root/script.it/shapes/matrix/EltsI.ml
blob: fcfdb50c5845989d7c772454c476a063f9b015bd (plain)
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
module type ORDERED_AND_OPERATIONAL =
sig

  (* Exception for from_string. Is raised when from_string is passed something
   * that is not an elt *)
  exception NonElt

  type t

  (* The zero element *)
  val zero : t

  (* The one element *)
  val one: t

  (* ts must be comparable *)
  val compare : t -> t -> Order.order

  (* Basic mathematical operations must be possible *)
  val add: t -> t -> t

  val subtract: t -> t -> t

  val multiply: t -> t -> t

  val divide: t -> t -> t

end