summaryrefslogtreecommitdiff
path: root/compiler/Cps.ml
diff options
context:
space:
mode:
authorSon Ho2024-06-03 17:24:06 +0200
committerSon Ho2024-06-03 17:24:06 +0200
commitb259af6d427fa188037dafe1ef19704f31fbbf2c (patch)
tree7360e37830f3bea55afe95bb4a9b9df7c7b5e9d3 /compiler/Cps.ml
parent311a162dcc65233d628303a1114b529b8eff29a0 (diff)
Fix a bug when composing the continuations in eval_statement
Diffstat (limited to '')
-rw-r--r--compiler/Cps.ml6
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/Cps.ml b/compiler/Cps.ml
index 142c2b08..f7694ba2 100644
--- a/compiler/Cps.ml
+++ b/compiler/Cps.ml
@@ -106,6 +106,12 @@ let cc_singleton file line span cf el =
| Some _ -> internal_error file line span
| _ -> None
+let cf_singleton file line span el =
+ match el with
+ | Some [ e ] -> Some e
+ | Some _ -> internal_error file line span
+ | _ -> None
+
(** It happens that we need to concatenate lists of results, for
instance when evaluating the branches of a match. When applying
the continuations to build the symbolic expressions, we need