From 65f959df70d535f4340492bb9bbb7903bdc30fcf Mon Sep 17 00:00:00 2001 From: Cheng Lou Date: Fri, 18 Sep 2020 04:49:48 -0700 Subject: [PATCH] [Super errors] Simplify type mismatch printing Tweak some layout. This'll help a subsequent diff in the rescript repo. --- typing/printtyp.ml | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/typing/printtyp.ml b/typing/printtyp.ml index e1c9619ee67a..a05e27fa7281 100644 --- a/typing/printtyp.ml +++ b/typing/printtyp.ml @@ -1609,12 +1609,7 @@ let super_trace ppf = fprintf ppf "Further expanded:@," end; fprintf ppf - "@[\ - @[%a@]@,\ - vs@,\ - @[%a@]\ - %a\ - @]" + "@[%a@ vs@ %a@]%a" (super_type_expansion ~tag:"error" t1) t1' (super_type_expansion ~tag:"info" t2) t2' (super_trace false) rem; @@ -1638,14 +1633,8 @@ let super_unification_error unif tr txt1 ppf txt2 = begin let tr = List.map prepare_expansion tr in fprintf ppf "@[\ - @[\ - %t@,\ - @[<2>%a@]\ - @]@,\ - @[\ - %t@,\ - @[<2>%a@]\ - @]\ + @[%t@ %a@]@,\ + @[%t@ %a@]\ %a\ %t\ @]"