-
Notifications
You must be signed in to change notification settings - Fork 86
/
Copy pathcompat.mli
138 lines (108 loc) · 3.86 KB
/
compat.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
open Typedtree
open Types
val mkTvar : string option -> type_desc
val mkTarrow :
Asttypes.arg_label * type_expr * type_expr * commutable -> type_desc
type apply_arg
type texp_function = {
arg_label : Asttypes.arg_label;
param : Ident.t;
cases : value case list;
}
type texp_ident_identifier
type texp_apply_identifier
type texp_tuple_identifier
type texp_construct_identifier
type texp_function_identifier
type texp_sequence_identifier
type texp_match_identifier
val mkTexp_ident :
?id:texp_ident_identifier ->
Path.t * Longident.t Location.loc * value_description ->
expression_desc
val mkTexp_apply :
?id:texp_apply_identifier ->
expression * (Asttypes.arg_label * apply_arg) list ->
expression_desc
val mkTexp_tuple :
?id:texp_tuple_identifier -> expression list -> expression_desc
val mkTexp_construct :
?id:texp_construct_identifier ->
Longident.t Location.loc * constructor_description * expression list ->
expression_desc
val mkTexp_function :
?id:texp_function_identifier -> texp_function -> expression_desc
val mkTexp_sequence :
?id:texp_sequence_identifier -> expression * expression -> expression_desc
val mkTexp_match :
?id:texp_match_identifier ->
expression * computation case list * partial ->
expression_desc
val mkTtyp_any : core_type_desc
val mkTtyp_var : string -> core_type_desc
val is_type_name_used : core_type_desc -> string -> bool
type matched_expression_desc =
| Texp_ident of
Path.t
* Longident.t Location.loc
* value_description
* texp_ident_identifier
| Texp_apply of
expression * (Asttypes.arg_label * apply_arg) list * texp_apply_identifier
| Texp_construct of
Longident.t Location.loc
* constructor_description
* expression list
* texp_construct_identifier
| Texp_tuple of expression list * texp_tuple_identifier
| Texp_function of texp_function * texp_function_identifier
| Texp_sequence of expression * expression * texp_sequence_identifier
| Texp_match of
expression * computation case list * partial * texp_match_identifier
| O of expression_desc
val view_texp : expression_desc -> matched_expression_desc
type tpat_var_identifier
type tpat_alias_identifier
type tpat_array_identifier
val mkTpat_var :
?id:tpat_var_identifier -> Ident.t * string Location.loc -> value pattern_desc
val mkTpat_alias :
?id:tpat_alias_identifier ->
value general_pattern * Ident.t * string Location.loc ->
value pattern_desc
val mkTpat_array :
?id:tpat_array_identifier -> value general_pattern list -> value pattern_desc
type 'a matched_pattern_desc =
| Tpat_var :
Ident.t * string Location.loc * tpat_var_identifier
-> value matched_pattern_desc
| Tpat_alias :
value general_pattern
* Ident.t
* string Location.loc
* tpat_alias_identifier
-> value matched_pattern_desc
| Tpat_array :
value general_pattern list * tpat_array_identifier
-> value matched_pattern_desc
| O : 'a pattern_desc -> 'a matched_pattern_desc
val view_tpat : 'a pattern_desc -> 'a matched_pattern_desc
type tstr_eval_identifier
val mkTstr_eval :
?id:tstr_eval_identifier -> expression * attributes -> structure_item_desc
type matched_structure_item_desc =
| Tstr_eval of expression * attributes * tstr_eval_identifier
| O of structure_item_desc
val view_tstr : structure_item_desc -> matched_structure_item_desc
type arg_identifier
val mkArg : ?id:arg_identifier -> expression -> apply_arg
val map_arg_or_omitted : (expression -> expression) -> apply_arg -> apply_arg
val fold_arg_or_omitted :
('a -> expression * arg_identifier -> 'a) -> 'a -> apply_arg -> 'a
val option_of_arg_or_omitted : apply_arg -> (expression * arg_identifier) option
val mk_constructor_description : string -> constructor_description
val mk_value_binding :
vb_pat:value general_pattern ->
vb_expr:expression ->
vb_attributes:attributes ->
value_binding