From 20332f3faa5e1205602c946f1c7abb9b6660e6f0 Mon Sep 17 00:00:00 2001 From: Son Ho Date: Wed, 14 Dec 2022 18:25:49 +0100 Subject: Add a `Loop` node in the pure AST --- compiler/Extract.ml | 3 +++ 1 file changed, 3 insertions(+) (limited to 'compiler/Extract.ml') 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 -- cgit v1.2.3