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:
Louis Gesbert 2024-06-21 11:21:17 +02:00
parent f5b0c7ca7d
commit 09bdc3b4da

View File

@ -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