aboutsummaryrefslogtreecommitdiff
path: root/plugins/extraction/json.ml
diff options
context:
space:
mode:
authorErik Martin-Dorel2019-10-22 11:57:16 +0200
committerPierre Roux2019-11-01 10:21:51 +0100
commit3cb32772ccd0f2882a40d7f75b044b738adadad3 (patch)
tree6b0f67aae816c45d489534ac9702ee9092b6032c /plugins/extraction/json.ml
parent0caf27d014853693836ef06b1706502070b032f6 (diff)
Add extraction for primitive floats
Co-authored-by: Pierre Roux <pierre.roux@onera.fr>
Diffstat (limited to 'plugins/extraction/json.ml')
-rw-r--r--plugins/extraction/json.ml4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/extraction/json.ml b/plugins/extraction/json.ml
index 912a20f389..81b3e1bcdc 100644
--- a/plugins/extraction/json.ml
+++ b/plugins/extraction/json.ml
@@ -161,6 +161,10 @@ let rec json_expr env = function
("what", json_str "expr:int");
("int", json_str (Uint63.to_string i))
]
+ | MLfloat f -> json_dict [
+ ("what", json_str "expr:float");
+ ("float", json_str (Float64.to_string f))
+ ]
and json_one_pat env (ids,p,t) =
let ids', env' = push_vars (List.rev_map id_of_mlid ids) env in json_dict [