Skip to content

Commit 6c0c703

Browse files
committed
refactor
1 parent a9aaa40 commit 6c0c703

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

compiler/ml/error_message_utils.ml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ end = struct
6464
| None -> None
6565
end
6666
67-
(* TODO: Move this to appropriate place where it can be shared with typecore.ml *)
6867
let type_expr ppf typ =
6968
(* print a type and avoid infinite loops *)
7069
Printtyp.reset_and_mark_loops typ;

compiler/ml/typecore.ml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4168,10 +4168,8 @@ let longident = Printtyp.longident
41684168
let super_report_unification_error = Printtyp.super_report_unification_error
41694169
let report_ambiguous_type_error = Printtyp.report_ambiguous_type_error
41704170
let report_subtyping_error = Printtyp.report_subtyping_error
4171-
let type_expr ppf typ =
4172-
(* print a type and avoid infinite loops *)
4173-
Printtyp.reset_and_mark_loops typ;
4174-
Printtyp.type_expr ppf typ
4171+
4172+
let type_expr = Error_message_utils.type_expr
41754173
41764174
let report_error env loc ppf error =
41774175
match error with

0 commit comments

Comments
 (0)