-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtype.mli
72 lines (65 loc) · 1.45 KB
/
type.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
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
70
71
72
type t =
Unit
| Bool
| Int
| Float
| Char
| Fun of t list * t
| Tuple of t list
| List of t
| Array of t
| Ref of t
| Variant of Id.t
| Var of Id.t
type usingCategory = (* how to use the datum *)
| U_Unit
| U_Bool
| U_Int
| U_Float
| U_Char
| U_Tuple of usingCategory list
| U_Fun of usingCategory list * usingCategory
| U_Ref of usingCategory
| U_List of usingCategory
| U_Array of usingCategory
| U_Variant of Id.t
type listCategory =
| List_Float
| List_Other
type refCategory = (* how to point the datum on the memory *)
| R_Unit
| R_Int
| R_Float
| R_Char
| R_Tuple
| R_Ref
| R_Variant
type exprCategory = (* how to store the datum on the memory *)
| E_Unit
| E_Int
| E_Float
| E_Char
| E_List
| E_FList
| E_Array
| E_FArray
| E_Tuple of refCategory list
| E_Ref
| E_Variant
val to_uc : t -> usingCategory
val to_rc : t -> refCategory
val to_ec : t -> exprCategory
type mType = (* OBSOLETED *)
| C_Unit | C_Int | C_Float | C_Char | C_Tuple | C_Ref | C_Variant
val to_mt : t -> mType
val gentype : string -> t
val mt_equal : t -> t -> bool
val equal : t -> t -> bool
val of_sexpr : Sexpr.t -> t
val to_sexpr : t -> Sexpr.t
val to_string : t -> string
val typed_id_to_string : string -> Id.t -> t -> string
val read_from_stream : char Stream.t -> t
val of_string : string -> t
val listCategory_to_sexpr : listCategory -> Sexpr.t
val listCategory_of_sexpr : Sexpr.t -> listCategory