aboutsummaryrefslogtreecommitdiffhomepage
path: root/plugins/extraction
diff options
context:
space:
mode:
authorGravatar Nickolai Zeldovich <nickolai@csail.mit.edu>2015-04-05 12:26:57 -0400
committerGravatar Pierre Letouzey <pierre.letouzey@inria.fr>2015-04-09 12:09:03 +0200
commit1688d4af1896effb42fa5dd191948795c59288a4 (patch)
treeda13a8bd88b01c35a45be17fd1590dd9ea412329 /plugins/extraction
parentfb8c4b8903e82b36ebcf28dfe18282fb05a93d4f (diff)
JSON extraction: make explicit each group of mutually-recursive fixpoints
Diffstat (limited to 'plugins/extraction')
-rw-r--r--plugins/extraction/json.ml17
1 files changed, 10 insertions, 7 deletions
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);