From c8c3074a2775ccf53214389eb78c29fecff26fd4 Mon Sep 17 00:00:00 2001 From: Joseph Ferano Date: Sat, 12 Sep 2026 04:02:24 +0700 Subject: [PATCH] break and continue say they do not exist They came back as "unknown function break", which reads as a typo rather than as a missing feature. plan.org's loop story is settled as imperative while/for with break, continue and return, so these are named, planned and absent - and they alter control flow, which is the first thing the house rule says must be recognised explicitly rather than left to fall through to a call. Found by the lane writing the documentation site, which had to describe the loop forms and discovered two of them were neither implemented nor refused. --- lib/parse.ml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/parse.ml b/lib/parse.ml index 3c822d2..d513fe9 100644 --- a/lib/parse.ml +++ b/lib/parse.ml @@ -333,6 +333,12 @@ and form f mk (head : Form.t) (args : Form.t list) : Ast.expr = the restart stack without committing to one. *) | "find-restart" | "compute-restarts" | "errdefer" | "with-allocator" | "loop" | "recur" + (* plan.org's loop story is settled as imperative while/for with these + two and [return]. Neither exists, and both *alter control flow* — + the first thing the house rule says must be recognised explicitly. + Falling through to Call answered "unknown function break", which + reads as a typo rather than as a missing feature. *) + | "break" | "continue" | "await" as name) -> fail f "%s is not implemented yet (see the build sequence in plan.org)" name