From 1688d4af1896effb42fa5dd191948795c59288a4 Mon Sep 17 00:00:00 2001 From: Nickolai Zeldovich Date: Sun, 5 Apr 2015 12:26:57 -0400 Subject: JSON extraction: make explicit each group of mutually-recursive fixpoints --- plugins/extraction/json.ml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'plugins/extraction') diff --git a/plugins/extraction/json.ml b/plugins/extraction/json.ml index f19fba6f1..125dc86b8 100644 --- a/plugins/extraction/json.ml +++ b/plugins/extraction/json.ml @@ -221,13 +221,16 @@ let pp_decl = function ("argnames", json_list (List.map json_id l)); ("value", json_type l t) ] - | Dfix (rv, defs, typs) -> prvecti_with_sep pr_comma (fun i r -> - json_dict [ - ("what", json_str "decl:fix"); - ("name", json_global Term rv.(i)); - ("type", json_type [] typs.(i)); - ("value", json_function (empty_env ()) defs.(i)) - ]) rv + | Dfix (rv, defs, typs) -> json_dict [ + ("what", json_str "decl:fixgroup"); + ("fixlist", json_listarr (Array.mapi (fun i r -> + json_dict [ + ("what", json_str "fixgroup:item"); + ("name", json_global Term rv.(i)); + ("type", json_type [] typs.(i)); + ("value", json_function (empty_env ()) defs.(i)) + ]) rv)) + ] | Dterm (r, a, t) -> json_dict [ ("what", json_str "decl:term"); ("name", json_global Term r); -- cgit v1.2.3