@@ -1429,7 +1429,6 @@ let rec trace_same_names = function
14291429 type_same_name t1 t2; type_same_name t1' t2'; trace_same_names rem
14301430 | _ -> ()
14311431
1432- #if defined BS_NO_COMPILER_PATCH then
14331432let unification_error unif tr txt1 ppf txt2 =
14341433 reset () ;
14351434 trace_same_names tr;
@@ -1458,7 +1457,13 @@ let unification_error unif tr txt1 ppf txt2 =
14581457 with exn ->
14591458 print_labels := true ;
14601459 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
14621467let super_type_expansion ~tag t ppf t' =
14631468 if same_path t t' then begin
14641469 Format. pp_open_tag ppf tag;
@@ -1502,7 +1507,7 @@ let super_trace ppf =
15021507 | _ -> ()
15031508 in super_trace true ppf
15041509
1505- let unification_error unif tr txt1 ppf txt2 = begin
1510+ let super_unification_error unif tr txt1 ppf txt2 = begin
15061511 reset () ;
15071512 trace_same_names tr;
15081513 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
15381543 print_labels := true ;
15391544 raise exn
15401545end
1541- #end
15421546
1543- let report_unification_error ppf env ?(unif =true )
1547+ let super_report_unification_error ppf env ?(unif =true )
15441548 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)
15461550;;
1551+ #end
15471552
15481553let trace fst keep_last txt ppf tr =
15491554 print_labels := not ! Clflags. classic;
0 commit comments