mirror of
https://github.com/CatalaLang/catala.git
synced 2024-09-19 00:15:39 +03:00
Printer: print closures as functions
This avoids differences in test results depending on wether closure conversion is enabled or not: the functional values within structure are a different type internally but with this patch they are printed the same.
This commit is contained in:
parent
f5b0c7ca7d
commit
09bdc3b4da
@ -1113,6 +1113,8 @@ module UserFacing = struct
|
||||
~pp_sep:(fun ppf () -> Format.fprintf ppf ";@ ")
|
||||
(value ~fallback lang))
|
||||
l
|
||||
| ETuple [EAbs { tys = (TClosureEnv, _)::_ ; _ }, _; _] ->
|
||||
Format.pp_print_string ppf "<function>"
|
||||
| ETuple l ->
|
||||
Format.fprintf ppf "@[<hv 2>(@,@[<hov>%a@]@;<0 -2>)@]"
|
||||
(Format.pp_print_list
|
||||
|
Loading…
Reference in New Issue
Block a user