@@ -1429,7 +1429,6 @@ let rec trace_same_names = function
1429
1429
type_same_name t1 t2; type_same_name t1' t2'; trace_same_names rem
1430
1430
| _ -> ()
1431
1431
1432
- #if defined BS_NO_COMPILER_PATCH then
1433
1432
let unification_error unif tr txt1 ppf txt2 =
1434
1433
reset () ;
1435
1434
trace_same_names tr;
@@ -1458,7 +1457,13 @@ let unification_error unif tr txt1 ppf txt2 =
1458
1457
with exn ->
1459
1458
print_labels := true ;
1460
1459
raise exn
1461
- #else
1460
+
1461
+ let report_unification_error ppf env ?(unif =true )
1462
+ tr txt1 txt2 =
1463
+ wrap_printing_env env (fun () -> unification_error unif tr txt1 ppf txt2)
1464
+ ;;
1465
+
1466
+ #if undefined BS_NO_COMPILER_PATCH then
1462
1467
let super_type_expansion ~tag t ppf t' =
1463
1468
if same_path t t' then begin
1464
1469
Format. pp_open_tag ppf tag;
@@ -1502,7 +1507,7 @@ let super_trace ppf =
1502
1507
| _ -> ()
1503
1508
in super_trace true ppf
1504
1509
1505
- let unification_error unif tr txt1 ppf txt2 = begin
1510
+ let super_unification_error unif tr txt1 ppf txt2 = begin
1506
1511
reset () ;
1507
1512
trace_same_names tr;
1508
1513
let tr = List. map (fun (t , t' ) -> (t, hide_variant_name t')) tr in
@@ -1538,12 +1543,12 @@ let unification_error unif tr txt1 ppf txt2 = begin
1538
1543
print_labels := true ;
1539
1544
raise exn
1540
1545
end
1541
- #end
1542
1546
1543
- let report_unification_error ppf env ?(unif =true )
1547
+ let super_report_unification_error ppf env ?(unif =true )
1544
1548
tr txt1 txt2 =
1545
- wrap_printing_env env (fun () -> unification_error unif tr txt1 ppf txt2)
1549
+ wrap_printing_env env (fun () -> super_unification_error unif tr txt1 ppf txt2)
1546
1550
;;
1551
+ #end
1547
1552
1548
1553
let trace fst keep_last txt ppf tr =
1549
1554
print_labels := not ! Clflags. classic;
0 commit comments