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
| ELit l -> lit lang ppf 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
~pp_sep:(fun ppf () -> Format.fprintf ppf ";@ ")
(value ~fallback lang))

View File

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

View File

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

View File

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