You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 358f031
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/design/frontend/type-system/rows-and-records.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -103,6 +103,16 @@ Row equality is independent of source label order; matched fields have equal che
103
103
104
104
P5 receives kind-checked row expressions and resolved record operations from HIR. It supplies type equations and evidence to [type inference](type-inference.md) and emits verified THIR. Row normalization and the primitive row relations are internal to P5 and share the kind and evidence contracts of [kinds](kinds.md) and [classes](classes-and-evidence.md); a later stage receives only checked row types. The backend chooses record and variant representation only after Core lowering.
105
105
106
+
Core checks bare rows inside nominal type arguments with the same label-based
107
+
row relation as record rows. Nominal arguments stay invariant: fields must have
108
+
matching types, repeated bare-row labels retain their occurrence order, closed
109
+
rows must have the same label occurrences, and rigid tails cannot
110
+
absorb extra fields. Only quantified flexible tails receive checked residual
111
+
substitutions. Those residuals remain in instantiation evidence even when no
112
+
existing type-arena node represents them; later local-row materialization uses
113
+
that evidence rather than reconstructing the match.
114
+
115
+
106
116
## Open questions and future work
107
117
108
118
Use official tests to pin down duplicate-label diagnostics, record-update edge cases, and primitive row improvement order; [primitives](prim.md) owns the rules those tests exercise. [DEC-04](../../../decision/DEC-04-official-test-suite-roadmap.md) tracks implementation coverage.
0 commit comments