Skip to content

Compile the two shapes the checker accepted and the backend could not lower - #930

Merged
onatozmenn merged 1 commit into
mainfrom
backend-lowers-what-the-checker-accepts
Aug 5, 2026
Merged

Compile the two shapes the checker accepted and the backend could not lower#930
onatozmenn merged 1 commit into
mainfrom
backend-lowers-what-the-checker-accepts

Conversation

@onatozmenn

Copy link
Copy Markdown
Collaborator

A pattern inside a record pattern, Box { size: Inner { depth } }, and a let that takes a value apart, let Point { x, y } = point. Both check. Both run under the interpreter. Neither could be lowered, so deed build and deed test --compiled had nothing to say about a file that used one.

Nothing had noticed, and the reason is worth writing down: a program the backend cannot lower and a program with no tests in it produce the same silence. --compiled prints "no tests found in the compiled backend" for both.

corpus_backend.rs already said the backend refuses nothing, and that claim was true. It was a claim about examples/, which is the shapes one author happened to write, not about the language. So the fix comes with the ratchet that would have caught it: every case in conformance/ the checker accepts is now held to being lowerable, and the conformance suite is written the other way round, to cover the language rather than to be a program.

Break-verified: reverting the let lowering fails the_backend_lowers_every_conformance_case_the_checker_accepts by name.

Both shapes also join agreement.rs, so the two engines are pinned to the same answer rather than only to having one, and both get a run- conformance case so the interpreter's answer is written down too.

The rest of the refusal list was swept the same way: empty-brace variant patterns, catch-all arms, ordering and + past Int, structural equality on records and choices, nested match, bound comparisons on Ratio, and assert refuses all compile or are refused by the checker before the backend ever sees them.

… lower

A pattern inside a record pattern, `Box { size: Inner { depth } }`, and a `let`
that takes a value apart, `let Point { x, y } = point`. Both check. Both run
under the interpreter. Neither could be lowered, so `deed build` and
`deed test --compiled` had nothing to say about a file that used one.

Nothing had noticed, and the reason is worth writing down: a program the
backend cannot lower and a program with no tests in it produce the same
silence. `--compiled` prints "no tests found in the compiled backend" for
both.

`corpus_backend.rs` already said the backend refuses nothing, and that claim
was true. It was a claim about `examples/`, which is the shapes one author
happened to write, not about the language. So the fix comes with the ratchet
that would have caught it: every case in `conformance/` the checker accepts is
now held to being lowerable, and the conformance suite is written the other
way round, to cover the language rather than to be a program.

Break-verified: reverting the `let` lowering fails
`the_backend_lowers_every_conformance_case_the_checker_accepts` by name.

Both shapes also join `agreement.rs`, so the two engines are pinned to the
same answer rather than only to having one.
@onatozmenn
onatozmenn merged commit c15696c into main Aug 5, 2026
8 checks passed
@onatozmenn
onatozmenn deleted the backend-lowers-what-the-checker-accepts branch August 5, 2026 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant