-
Notifications
You must be signed in to change notification settings - Fork 17
/
prim.mli
44 lines (31 loc) · 615 Bytes
/
prim.mli
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
(*
* (c) 2014 Andreas Rossberg
*)
(* Representation *)
type typ =
| BoolT
| IntT
| CharT
| TextT
| VarT
type const =
| BoolV of bool
| IntV of int
| CharV of char
| TextV of string
| FunV of func
and func =
{ name : string;
typ : typ list * typ list;
fn : const list -> const list
}
(* Conversions *)
val typ_of_string : string -> typ option
val fun_of_string : string -> func option
val string_of_typ : typ -> string
val string_of_const : const -> string
val typ_of_const : const -> typ
val is_poly : func -> bool
(* Lists *)
val typs : typ list
val funs : func list