✓
Passing This code compiles and runs correctly.
Code
// Pins the third render from the register block: scope-grammar teaches HOW a
// call is written (the wire's shape rules, the constant half) above the
// scope's own verb lines (the derived half, scope-vocabulary's render). A
// prompt built from these bytes and a turn judged by parse.wire are one
// declaration read twice — the lesson and the law cannot drift apart.
import std/runtime
import std/io
pub tor open { path: string } -> string<open!>
open -> { "note_0" }
pub tor append { handle: string<!open>, text: string } -> string<open!>
append -> { handle }
pub tor close { handle: string<!open> }
close -> {}
pub tor say { text: string }
say -> {}
std/runtime:register(scope: "notes") {
open(10)
append(1)
close(1)
say(1)
}
std/runtime:scope-grammar(name: "notes")
| ok g |> std/io:print.ln("{{ g:s }}")
| not-found |> std/io:print.ln("NOT FOUND")
std/runtime:scope-grammar(name: "no-such-scope")
| ok g |> std/io:print.ln("UNEXPECTED: {{ g:s }}")
| not-found |> std/io:print.ln("NOT FOUND")
Actual
A wire line is exactly one invocation: verb(field: "value", field: "value")
- One invocation per turn. Nothing after the closing ')': no chains (|>), no second line, no trailing text.
- The verb is a bare name from your vocabulary — letters, digits, '-', '_' — immediately followed by '('.
- Every value is a double-quoted string; escape quotes and backslashes inside (\", \\). No bare values.
- A field whose type carries <!name> is a handle: issued by an earlier call, still held. Never invent one.
- Prose is not wire. To speak, call the vocabulary's voice verb; to act, call its verb. Nothing else parses.
Your vocabulary:
open(path: string)
append(handle: string<!open>, text: string)
close(handle: string<!open>)
say(text: string)
NOT FOUND
Expected output
A wire line is exactly one invocation: verb(field: "value", field: "value")
- One invocation per turn. Nothing after the closing ')': no chains (|>), no second line, no trailing text.
- The verb is a bare name from your vocabulary — letters, digits, '-', '_' — immediately followed by '('.
- Every value is a double-quoted string; escape quotes and backslashes inside (\", \\). No bare values.
- A field whose type carries <!name> is a handle: issued by an earlier call, still held. Never invent one.
- Prose is not wire. To speak, call the vocabulary's voice verb; to act, call its verb. Nothing else parses.
Your vocabulary:
open(path: string)
append(handle: string<!open>, text: string)
close(handle: string<!open>)
say(text: string)
NOT FOUND
Flows
flow ~register click a branch to expand · @labels scroll to their anchor
register (scope: "notes", source: open(10)
append(1)
close(1)
say(1))
flow ~scope-grammar click a branch to expand · @labels scroll to their anchor
scope-grammar (name: "notes")
flow ~scope-grammar click a branch to expand · @labels scroll to their anchor
scope-grammar (name: "no-such-scope")
Test Configuration
MUST_RUN