aboutsummaryrefslogtreecommitdiff
path: root/dataType.mli
blob: 901346c1dec4a9afd59d8728d2462121423c4294 (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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
module type COMPARABLE = sig
  type t
  val eq: t -> t -> bool
  val neq: t -> t -> bool
  val lt: t -> t -> bool
  val le: t -> t -> bool
  val gt: t -> t -> bool
  val ge: t -> t -> bool
end

module Num: sig

  type t

  val of_num: Num.num -> t
  val nan: t

  val to_num: t -> Num.num

  val neg: t -> t

  val eq: t -> t -> bool
  val neq: t -> t -> bool
  val lt: t -> t -> bool
  val le: t -> t -> bool
  val gt: t -> t -> bool
  val ge: t -> t -> bool

  val add: t -> t -> t
  val sub: t -> t -> t
  val mult: t -> t -> t
  val div: t -> t -> t
  val pow: t -> t -> t

  val rnd: unit -> t

  val max: t -> t -> t
  val min: t -> t -> t

  val abs: t -> t
end

module Bool: sig
  type t = bool

  val true_ : bool
  val false_: bool 

  val eq: t -> t -> bool
  val neq: t -> t -> bool
  val lt: t -> t -> bool
  val le: t -> t -> bool
  val gt: t -> t -> bool
  val ge: t -> t -> bool

  val not: t -> t
  val and_: t -> t -> t
  val or_: t -> t -> t
end

module String: sig
  type t = UTF8.t
  val eq: t -> t -> bool
  val neq: t -> t -> bool
  val lt: t -> t -> bool
  val le: t -> t -> bool
  val gt: t -> t -> bool
  val ge: t -> t -> bool
end