Runtime value printer: use <object> on non-printable entitites

This commit is contained in:
Louis Gesbert 2024-05-15 10:24:18 +02:00
parent 1cf34d9123
commit 5f289307a0
2 changed files with 6 additions and 5 deletions

View File

@ -60,7 +60,7 @@ let rec format_runtime_value lang ppf = function
~pp_sep:(fun ppf () -> Format.fprintf ppf ";@ ")
(format_runtime_value lang))
(Array.to_list elts)
| Runtime.Unembeddable -> Format.pp_print_string ppf "<?>"
| Runtime.Unembeddable -> Format.pp_print_string ppf "<object>"
let print_log lang entry =
let pp_infos =

View File

@ -44,7 +44,7 @@ $ catala Interpret -t -s HousingComputation --debug
[DEBUG] Translating to default calculus...
[DEBUG] Typechecking again...
[DEBUG] Starting interpretation...
[LOG] ≔ HousingComputation.f: <?>
[LOG] ≔ HousingComputation.f: <object>
[LOG] ☛ Definition applied:
─➤ tests/scope/good/scope_call3.catala_en:8.14-8.20:
@ -59,14 +59,15 @@ $ catala Interpret -t -s HousingComputation --debug
│ ‾
[LOG] → RentComputation.direct
[LOG] ≔ RentComputation.direct.input: RentComputation_in { }
[LOG] ≔ RentComputation.g: <?>
[LOG] ≔ RentComputation.f: <?>
[LOG] ≔ RentComputation.g: <object>
[LOG] ≔ RentComputation.f: <object>
[LOG] ☛ Definition applied:
─➤ tests/scope/good/scope_call3.catala_en:7.29-7.54:
7 │ definition f of x equals (output of RentComputation).f of x
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
[LOG] ≔ RentComputation.direct.output: RentComputation { -- f: <?> }
[LOG] ≔ RentComputation.direct.
output: RentComputation { -- f: <object> }
[LOG] ← RentComputation.direct
[LOG] → RentComputation.f
[LOG] ≔ RentComputation.f.input0: 1