dsl block’s resultOpen and answer this issue on GitHub.
compiler, blocked · opened 2026-10-07 · updated 2026-10-07 · 2 comments
Part of #497 (failing closed is the goal; the gaps are closed first).
The gap. The value of a dsl … { … } eod block has no type in the checker, and neither have the fields read from it. About 9 root causes were measured in #497:
dsl html in escaping, inventory/page, benches/page, benches/template;dsl mysql in the sql_statement fixture, with bound.id and bound.active.What the type is. The grammar’s entry rule declares it (entry rule … -> T). For a database block it is the row type the grammar declares (ADR-299 D2; #114 and #477 build the row).
To build
dsl block’s type is its grammar’s entry rule result type.Tests:
return dsl html { … } eod from a -> String function checks;sql_statement fixture’s bound.id is typed;Step 1 for dsl html built in 0.0.611 (d85751e). A dsl html { … } eod block without :name holes is a String to the checker (templates.rs, an_html_block_is_text_to_the_checker). The re-measurement (#497) has no dsl html root cause left.
Still missing:
dsl block for a grammar (the program’s own, or a package’s): its type is the grammar’s entry rule result. Not built. Which entry a block uses when a grammar has several is what dsl.rs decides, and the checker has to ask the same.sql_statement fixture: bound.id, bound.active), which joins #114.Generated by Claude Code
Set to blocked. What is left of #505 waits on two things:
dsl Json { … } eod): the lowering refuses such a block today (Num isn’t a language the compiler knows), although Part II specifies it. That is #518. Typing the block as the entry rule’s result belongs in the same change, because there is nothing to type until it lowers.dsl html is done (0.0.611).
Generated by Claude Code