aboutsummaryrefslogtreecommitdiff
path: root/plugins/extraction/ocaml.ml
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2020-07-06 16:18:33 +0200
committerPierre-Marie Pédrot2020-07-06 16:18:33 +0200
commit8907a5b7d2b91bff0b573956a05e4679b5238161 (patch)
tree2fff532e687a8e82543044352aeaf3168434aac1 /plugins/extraction/ocaml.ml
parent3244b9c6e4159042bae0cd2ad48aba77928d7b2d (diff)
parent0ea2d0ff4ed84e1cc544c958b8f6e98f6ba2e9b6 (diff)
Merge PR #11604: Primitive persistent arrays
Ack-by: JasonGross Ack-by: SkySkimmer Ack-by: ejgallego Ack-by: gares Reviewed-by: ppedrot Ack-by: proux01 Ack-by: silene
Diffstat (limited to 'plugins/extraction/ocaml.ml')
-rw-r--r--plugins/extraction/ocaml.ml5
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/extraction/ocaml.ml b/plugins/extraction/ocaml.ml
index a2ce47b11f..088405da5d 100644
--- a/plugins/extraction/ocaml.ml
+++ b/plugins/extraction/ocaml.ml
@@ -311,6 +311,11 @@ let rec pp_expr par env args =
| MLfloat f ->
assert (args=[]);
str "(" ++ str (Float64.compile f) ++ str ")"
+ | MLparray(t,def) ->
+ assert (args=[]);
+ let tuple = pp_array (pp_expr true env []) (Array.to_list t) in
+ let def = pp_expr true env [] def in
+ str "(ExtrNative.of_array [|" ++ tuple ++ str "|]" ++ spc () ++ def ++ str")"
and pp_record_proj par env typ t pv args =