File tree Expand file tree Collapse file tree 5 files changed +12
-22
lines changed Expand file tree Collapse file tree 5 files changed +12
-22
lines changed Original file line number Diff line number Diff line change @@ -53,8 +53,9 @@ open Btype
53
53
*)
54
54
55
55
(* *** Errors ****)
56
+ type type_pairs = (type_expr * type_expr ) list
56
57
57
- exception Unify of (type_expr * type_expr) list
58
+ exception Unify of type_pairs
58
59
59
60
exception Tags of label * label
60
61
@@ -100,11 +101,7 @@ type subtype_context =
100
101
issues : Record_coercion .record_field_subtype_violation list ;
101
102
}
102
103
103
- exception
104
- Subtype of
105
- (type_expr * type_expr) list
106
- * (type_expr * type_expr) list
107
- * subtype_context option
104
+ exception Subtype of type_pairs * type_pairs * subtype_context option
108
105
109
106
exception Cannot_expand
110
107
@@ -113,7 +110,7 @@ exception Cannot_apply
113
110
exception Recursive_abbrev
114
111
115
112
(* GADT: recursive abbrevs can appear as a result of local constraints *)
116
- exception Unification_recursive_abbrev of (type_expr * type_expr) list
113
+ exception Unification_recursive_abbrev of type_pairs
117
114
118
115
(* *** Type level management ****)
119
116
Original file line number Diff line number Diff line change @@ -49,17 +49,14 @@ type subtype_context =
49
49
issues : Record_coercion .record_field_subtype_violation list ;
50
50
}
51
51
52
- exception Unify of (type_expr * type_expr) list
52
+ type type_pairs = (type_expr * type_expr ) list
53
+ exception Unify of type_pairs
53
54
exception Tags of label * label
54
- exception
55
- Subtype of
56
- (type_expr * type_expr) list
57
- * (type_expr * type_expr) list
58
- * subtype_context option
55
+ exception Subtype of type_pairs * type_pairs * subtype_context option
59
56
exception Cannot_expand
60
57
exception Cannot_apply
61
58
exception Recursive_abbrev
62
- exception Unification_recursive_abbrev of (type_expr * type_expr) list
59
+ exception Unification_recursive_abbrev of type_pairs
63
60
64
61
val init_def : int -> unit
65
62
(* Set the initial variable level *)
Original file line number Diff line number Diff line change @@ -94,9 +94,9 @@ val super_report_unification_error :
94
94
val report_subtyping_error :
95
95
formatter ->
96
96
Env .t ->
97
- ( type_expr * type_expr ) list ->
97
+ Ctype .type_pairs ->
98
98
string ->
99
- ( type_expr * type_expr ) list ->
99
+ Ctype .type_pairs ->
100
100
Ctype .subtype_context option ->
101
101
unit
102
102
val report_ambiguous_type_error :
Original file line number Diff line number Diff line change @@ -51,9 +51,7 @@ type error =
51
51
| Private_type of type_expr
52
52
| Private_label of Longident .t * type_expr
53
53
| Not_subtype of
54
- (type_expr * type_expr ) list
55
- * (type_expr * type_expr ) list
56
- * Ctype .subtype_context option
54
+ Ctype .type_pairs * Ctype .type_pairs * Ctype .subtype_context option
57
55
| Too_many_arguments of bool * type_expr
58
56
| Abstract_wrong_label of Noloc .arg_label * type_expr
59
57
| Scoping_let_module of string * type_expr
Original file line number Diff line number Diff line change @@ -76,9 +76,7 @@ type error =
76
76
| Private_type of type_expr
77
77
| Private_label of Longident .t * type_expr
78
78
| Not_subtype of
79
- (type_expr * type_expr ) list
80
- * (type_expr * type_expr ) list
81
- * Ctype .subtype_context option
79
+ Ctype .type_pairs * Ctype .type_pairs * Ctype .subtype_context option
82
80
| Too_many_arguments of bool * type_expr
83
81
| Abstract_wrong_label of Noloc .arg_label * type_expr
84
82
| Scoping_let_module of string * type_expr
You can’t perform that action at this time.
0 commit comments