mirror of
https://github.com/CatalaLang/catala.git
synced 2024-09-19 16:28:12 +03:00
More space between multiple errors, no numbers if just one
This commit is contained in:
parent
a7094fe52d
commit
ad15984d0b
@ -326,10 +326,14 @@ module Content = struct
|
||||
ppf content;
|
||||
Format.pp_print_newline ppf ()
|
||||
|
||||
let emit_n (target : level) (contents : t list) : unit =
|
||||
let emit_n (target : level) = function
|
||||
| [content] -> emit content target
|
||||
| contents ->
|
||||
let ppf = get_ppf target in
|
||||
let len = List.length contents in
|
||||
List.iteri
|
||||
(fun i c ->
|
||||
if i > 0 then Format.pp_print_newline ppf ();
|
||||
let extra_label = Printf.sprintf "(%d/%d)" (succ i) len in
|
||||
let pp_marker ?extra_label:_ = pp_marker ~extra_label in
|
||||
emit ~pp_marker c target)
|
||||
|
@ -29,6 +29,7 @@ $ catala Typecheck
|
||||
│ 8 │ definition test_var equals 10 xor 20
|
||||
│ │ ‾‾‾
|
||||
└─ 'xor' should be a boolean operator
|
||||
|
||||
┌─[ERROR (2/2)]─
|
||||
│
|
||||
│ Error during typechecking, incompatible types:
|
||||
|
@ -32,6 +32,7 @@ $ catala test-scope A
|
||||
│
|
||||
│ Maybe you wanted to write : "definition" ?
|
||||
└─
|
||||
|
||||
┌─[ERROR (2/2)]─
|
||||
│
|
||||
│ Syntax error at "equal":
|
||||
|
@ -30,6 +30,7 @@ $ catala Typecheck
|
||||
│ 8 │ data i content integer
|
||||
│ │ ‾‾‾‾‾‾‾
|
||||
└─
|
||||
|
||||
┌─[ERROR (2/2)]─
|
||||
│
|
||||
│ Error during typechecking, incompatible types:
|
||||
|
Loading…
Reference in New Issue
Block a user