summaryrefslogtreecommitdiff
path: root/compiler/Extract.ml
diff options
context:
space:
mode:
authorSon Ho2022-12-14 18:25:49 +0100
committerSon HO2023-02-03 11:21:46 +0100
commit20332f3faa5e1205602c946f1c7abb9b6660e6f0 (patch)
tree4ac5f36f0487a53f6461885fd25c70c06b6f656c /compiler/Extract.ml
parent1a912cbf23c31c95041526c71bbd050bb5ac4e7c (diff)
Add a `Loop` node in the pure AST
Diffstat (limited to '')
-rw-r--r--compiler/Extract.ml3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/Extract.ml b/compiler/Extract.ml
index fbfcadfd..fa384de6 100644
--- a/compiler/Extract.ml
+++ b/compiler/Extract.ml
@@ -1394,6 +1394,9 @@ let rec extract_texpression (ctx : extraction_ctx) (fmt : F.formatter)
| Let (_, _, _, _) -> extract_lets ctx fmt inside e
| Switch (scrut, body) -> extract_Switch ctx fmt inside scrut body
| Meta (_, e) -> extract_texpression ctx fmt inside e
+ | Loop _ ->
+ (* The loop nodes should have been eliminated in {!PureMicroPasses} *)
+ raise (Failure "Unreachable")
(* Extract an application *or* a top-level qualif (function extraction has
* to handle top-level qualifiers, so it seemed more natural to merge the