Skip to content

fix(check): a pair where Data is expected names the spelling that is (#1632) - #2007

Merged
nicolas-abril merged 1 commit into
mainfrom
ai/1632-pair-data
Nov 2, 2026
Merged

nicolas-abril merged 1 commit into
mainfrom
ai/1632-pair-data

Conversation

@nicolas-abril

@nicolas-abril nicolas-abril commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

Proposal 7 of #1632, in a smaller form than #1737.

A & B is Sigma<&1, &1, ..>, so it is Type whatever A and B are, and nothing in the error says how to write a pair that is Data:

SOME PROOFS FAIL
Error:
- expected : Data
- observed : Type
Location: f
4 | 
5>| def f(xs: List<&2, U32 & U32>) -> List<&2, U32 & U32>:
  |                    ^^^^^^^^^
6 |   xs
Note: A & B is Type. A pair that is Data is +Sigma<A, _ => B>.
  • bend2/bend.ts: 3 lines at check-any's final throw, +81 ttok. prototype #1632.7: say why A & B is not Data #1737 adds about 287.
  • The note fires when Data is expected and the term is a Sigma. The quantity checks in prototype #1632.7: say why A & B is not Data #1737 aren't needed, since the mismatch already says it's Type. A wider version, on any Data/Type mismatch, fired on 11 unrelated tests, so it stays narrow.
  • +Sigma<U32, _ => U32> was checked as a List<&2, ..> element.
  • No existing test output changes. tests/check/pair_sugar_not_data.bend pins the note.
  • This doesn't make +(A & B) parse, which would change the language.

Touches the same throw as #2008, which merges second and combines the two notes.

Gates on the three PRs combined, on origin/main 3ca3df32: repo 54/54, test 1819/1819, perf 124/124. Ping fails 80/81 on the BendHub LICENSE check, the same as unchanged main on this machine.

🤖 Generated with Claude Code

…1632)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nicolas-abril
nicolas-abril merged commit 3b3f02e into main Nov 2, 2026
1 check passed
@nicolas-abril
nicolas-abril deleted the ai/1632-pair-data branch November 2, 2026 14:58
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.

2 participants