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.
This commit is contained in:
parent
8cb9654b52
commit
c8c3074a27
@ -333,6 +333,12 @@ and form f mk (head : Form.t) (args : Form.t list) : Ast.expr =
|
|||||||
the restart stack without committing to one. *)
|
the restart stack without committing to one. *)
|
||||||
| "find-restart" | "compute-restarts"
|
| "find-restart" | "compute-restarts"
|
||||||
| "errdefer" | "with-allocator" | "loop" | "recur"
|
| "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) ->
|
| "await" as name) ->
|
||||||
fail f "%s is not implemented yet (see the build sequence in plan.org)" name
|
fail f "%s is not implemented yet (see the build sequence in plan.org)" name
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user