open Pinc_types let rec pp fmt = function | Value.Null -> Format.fprintf fmt "\n%!" | Value.Int i -> Format.fprintf fmt "%i\n%!" i | Value.Float f -> Format.fprintf fmt "%f\n%!" f | Value.Bool b -> Format.fprintf fmt "%b\n%!" b | Value.Char c -> Format.fprintf fmt "%x\n%!" c | Value.String s -> Format.fprintf fmt "%S\n%!" s | Value.Array _ -> Format.fprintf fmt "\n%!" | Value.Record r -> Format.fprintf fmt "\n%!" pp_record r | Value.Closure _ -> Format.fprintf fmt "\n%!" | Value.Function _ -> Format.fprintf fmt "\n%!" | Value.BuiltinFunction _ -> Format.fprintf fmt "\n%!" | Value.HtmlTemplateNode _ -> Format.fprintf fmt "\n%!" | Value.FragmentTemplateNode _ -> Format.fprintf fmt "\n%!" | Value.PincTemplateNode _ -> Format.fprintf fmt "\n%!" | Value.PincTemplateIdentifier (_, id) -> Format.fprintf fmt "\n%!" id | Value.PincPortalNode { portal_name; _ } -> Format.fprintf fmt "\n%!" portal_name and pp_record fmt r = String_map.iter (fun key value -> Format.fprintf fmt "@;@[ %s: %a@]" key pp value) r ;;