Skip to content

Commit 1aa4e14

Browse files
committed
[super errors] Simplify type mismatch printing (#45) by Cheng
1 parent 169fed3 commit 1aa4e14

File tree

1 file changed

+3
-14
lines changed

1 file changed

+3
-14
lines changed

typing/printtyp.ml

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1609,12 +1609,7 @@ let super_trace ppf =
16091609
fprintf ppf "Further expanded:@,"
16101610
end;
16111611
fprintf ppf
1612-
"@[<v>\
1613-
@[%a@]@,\
1614-
vs@,\
1615-
@[%a@]\
1616-
%a\
1617-
@]"
1612+
"@[<hov>%a@ vs@ %a@]%a"
16181613
(super_type_expansion ~tag:"error" t1) t1'
16191614
(super_type_expansion ~tag:"info" t2) t2'
16201615
(super_trace false) rem;
@@ -1638,14 +1633,8 @@ let super_unification_error unif tr txt1 ppf txt2 = begin
16381633
let tr = List.map prepare_expansion tr in
16391634
fprintf ppf
16401635
"@[<v 0>\
1641-
@[<v 2>\
1642-
%t@,\
1643-
@[<2>%a@]\
1644-
@]@,\
1645-
@[<v 2>\
1646-
%t@,\
1647-
@[<2>%a@]\
1648-
@]\
1636+
@[<hov 2>%t@ %a@]@,\
1637+
@[<hov 2>%t@ %a@]\
16491638
%a\
16501639
%t\
16511640
@]"

0 commit comments

Comments
 (0)