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
5353*)
5454
5555(* *** Errors ****)
56+ type type_pairs = (type_expr * type_expr ) list
5657
57- exception Unify of (type_expr * type_expr) list
58+ exception Unify of type_pairs
5859
5960exception Tags of label * label
6061
@@ -100,11 +101,7 @@ type subtype_context =
100101 issues : Record_coercion .record_field_subtype_violation list ;
101102 }
102103
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
108105
109106exception Cannot_expand
110107
@@ -113,7 +110,7 @@ exception Cannot_apply
113110exception Recursive_abbrev
114111
115112(* 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
117114
118115(* *** Type level management ****)
119116
Original file line number Diff line number Diff line change @@ -49,17 +49,14 @@ type subtype_context =
4949 issues : Record_coercion .record_field_subtype_violation list ;
5050 }
5151
52- exception Unify of (type_expr * type_expr) list
52+ type type_pairs = (type_expr * type_expr ) list
53+ exception Unify of type_pairs
5354exception 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
5956exception Cannot_expand
6057exception Cannot_apply
6158exception Recursive_abbrev
62- exception Unification_recursive_abbrev of (type_expr * type_expr) list
59+ exception Unification_recursive_abbrev of type_pairs
6360
6461val init_def : int -> unit
6562(* Set the initial variable level *)
Original file line number Diff line number Diff line change @@ -94,9 +94,9 @@ val super_report_unification_error :
9494val report_subtyping_error :
9595 formatter ->
9696 Env .t ->
97- ( type_expr * type_expr ) list ->
97+ Ctype .type_pairs ->
9898 string ->
99- ( type_expr * type_expr ) list ->
99+ Ctype .type_pairs ->
100100 Ctype .subtype_context option ->
101101 unit
102102val report_ambiguous_type_error :
Original file line number Diff line number Diff line change @@ -51,9 +51,7 @@ type error =
5151 | Private_type of type_expr
5252 | Private_label of Longident .t * type_expr
5353 | 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
5755 | Too_many_arguments of bool * type_expr
5856 | Abstract_wrong_label of Noloc .arg_label * type_expr
5957 | Scoping_let_module of string * type_expr
Original file line number Diff line number Diff line change @@ -76,9 +76,7 @@ type error =
7676 | Private_type of type_expr
7777 | Private_label of Longident .t * type_expr
7878 | 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
8280 | Too_many_arguments of bool * type_expr
8381 | Abstract_wrong_label of Noloc .arg_label * type_expr
8482 | Scoping_let_module of string * type_expr
You can’t perform that action at this time.
0 commit comments