@stream walk: scoped thread, owned at the boundary, the Rust reader’s owned form, walking twice, the ledger’s line (ADR-grammar-typed-read-v1 D7)Open and answer this issue on GitHub.
ready · opened 2026-11-22 · updated 2026-11-22 · 1 comment
Part of #2426 After #2708
ADR-grammar-typed-read-v1 D7, as rewritten after the owner’s decision on #2426 (2026-11-22), makes a @stream call a sequence like any other. It may be held, passed on, handed back, stored, given to a task and combined. An item views the input, and the compiler chooses how each walk runs. “A for over a @stream call runs its body as the parser’s each” (#2708) builds the direct for (push) and refuses the other uses where the item holds a view (NK1355). This issue builds the methods for those uses, so nothing is refused.
for whose body pauses, run the parser on a thread that borrows the input (std::thread::scope), so items keep their views.NK1355 and its interim refusals go.G::<rule>_reader(r)) hands out the owned form of item 2; NK1345 applies to that form.tests/compiler/tests/ for each row of D7’s table, with the ledger’s line.Each use D7 names (held, passed on, handed back, stored, given to a task, combined, walked twice) compiles and runs with items that view the input where the loan covers the walk. NK1355 is retired. The ledger names the method per walk, and a test per row is green.
From the report of the run of issue-2708-run3 (#2708):
the thread walks of a @stream whose items view the input are refused with NK1359 (emit_stream_thread_refused in emit_grammar.nika); building a thread that borrows the input lifts it
Generated by Claude Code