Don't put a box in list printing but do indent

This commit is contained in:
Denis Merigoux 2023-10-12 12:01:28 +02:00
parent 186e2dfa64
commit 9024cf1222
No known key found for this signature in database
GPG Key ID: EE99DCFA365C3EE3
4 changed files with 13 additions and 18 deletions

View File

@ -1052,7 +1052,7 @@ module UserFacing = struct
match Mark.remove e with match Mark.remove e with
| ELit l -> lit lang ppf l | ELit l -> lit lang ppf l
| EArray l | ETuple l -> | EArray l | ETuple l ->
Format.fprintf ppf "@[<hov 1>[@;<0 1>%a@;<0 -1>]@]" Format.fprintf ppf "[@;<0 2>%a@;<0 -2>]"
(Format.pp_print_list (Format.pp_print_list
~pp_sep:(fun ppf () -> Format.fprintf ppf ";@ ") ~pp_sep:(fun ppf () -> Format.fprintf ppf ";@ ")
(value ~fallback lang)) (value ~fallback lang))

View File

@ -33,8 +33,7 @@ scope B:
$ catala Interpret -s A $ catala Interpret -s A
[RESULT] Computation successful! Results: [RESULT] Computation successful! Results:
[RESULT] [RESULT]
x = x = [S { -- id: 0 -- income: $0.00 }; S { -- id: 1 -- income: $9.00 };
[S { -- id: 0 -- income: $0.00 }; S { -- id: 1 -- income: $9.00 };
S { -- id: 2 -- income: $5.20 }] S { -- id: 2 -- income: $5.20 }]
``` ```
@ -48,8 +47,7 @@ $ catala Interpret -s B
$ catala Interpret_Lcalc -s A --avoid_exceptions --optimize $ catala Interpret_Lcalc -s A --avoid_exceptions --optimize
[RESULT] Computation successful! Results: [RESULT] Computation successful! Results:
[RESULT] [RESULT]
x = x = ESome [ESome S { -- id: ESome 0 -- income: ESome $0.00 };
ESome [ESome S { -- id: ESome 0 -- income: ESome $0.00 };
ESome S { -- id: ESome 1 -- income: ESome $9.00 }; ESome S { -- id: ESome 1 -- income: ESome $9.00 };
ESome S { -- id: ESome 2 -- income: ESome $5.20 }] ESome S { -- id: ESome 2 -- income: ESome $5.20 }]
``` ```

View File

@ -22,7 +22,6 @@ $ catala Interpret_Lcalc -s A --avoid_exceptions --optimize
[RESULT] [RESULT]
x = ESome [ESome 0; ESome 1; ESome 2; ESome 3; ESome 4; ESome 5; ESome 6] x = ESome [ESome 0; ESome 1; ESome 2; ESome 3; ESome 4; ESome 5; ESome 6]
[RESULT] [RESULT]
y = y = ESome [ESome 0; ESome 1; ESome 2; ESome 3; ESome 4; ESome 5; ESome 6;
ESome [ESome 0; ESome 1; ESome 2; ESome 3; ESome 4; ESome 5; ESome 6;
ESome 7; ESome 8; ESome 9; ESome 10] ESome 7; ESome 8; ESome 9; ESome 10]
``` ```

View File

@ -33,8 +33,7 @@ scope B:
$ catala Interpret -s A $ catala Interpret -s A
[RESULT] Computation successful! Results: [RESULT] Computation successful! Results:
[RESULT] [RESULT]
x = x = [S { -- id: 0 -- income: $0.00 }; S { -- id: 1 -- income: $9.00 };
[S { -- id: 0 -- income: $0.00 }; S { -- id: 1 -- income: $9.00 };
S { -- id: 2 -- income: $5.20 }] S { -- id: 2 -- income: $5.20 }]
``` ```
@ -48,8 +47,7 @@ $ catala Interpret -s B
$ catala Interpret_Lcalc -s A --avoid_exceptions --optimize $ catala Interpret_Lcalc -s A --avoid_exceptions --optimize
[RESULT] Computation successful! Results: [RESULT] Computation successful! Results:
[RESULT] [RESULT]
x = x = ESome [ESome S { -- id: ESome 0 -- income: ESome $0.00 };
ESome [ESome S { -- id: ESome 0 -- income: ESome $0.00 };
ESome S { -- id: ESome 1 -- income: ESome $9.00 }; ESome S { -- id: ESome 1 -- income: ESome $9.00 };
ESome S { -- id: ESome 2 -- income: ESome $5.20 }] ESome S { -- id: ESome 2 -- income: ESome $5.20 }]
``` ```