Commit e3d4806
Three compiler-level fixes surfaced by stdlib/testing.affine:
- ExprApp f []: a zero-arg call f() on an explicit () -> T thunk
(record field / param / lambda) now consumes the unit and yields T.
Zero-param fn *declarations* are bare-return-typed, so they are
unaffected; curried/partial application never reaches this branch
with an empty arg list, so peeling one unit arrow is sound.
- StmtLet: each destructured name is generalized at *its own*
component type, not the whole value type. let x = e is unchanged;
let (a, b) = e now types a and b at their element types.
- RuntimeError(String): registered as the interpreter's builtin
exception variant (resolve seed + typecheck constructor_env) so
try/catch arms in the honest stdlib resolve and type-check.
Plus stdlib/testing.affine: let mut found; tot / float(iterations).
Full suite 233/233, zero regression. Refs #128.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent c1fcd21 commit e3d4806
3 files changed
Lines changed: 42 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
92 | 95 | | |
93 | 96 | | |
94 | 97 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
709 | 709 | | |
710 | 710 | | |
711 | 711 | | |
712 | | - | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
713 | 730 | | |
714 | 731 | | |
715 | 732 | | |
| |||
1086 | 1103 | | |
1087 | 1104 | | |
1088 | 1105 | | |
1089 | | - | |
1090 | 1106 | | |
1091 | | - | |
1092 | | - | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
1093 | 1113 | | |
1094 | 1114 | | |
1095 | 1115 | | |
| |||
1274 | 1294 | | |
1275 | 1295 | | |
1276 | 1296 | | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
1277 | 1309 | | |
1278 | 1310 | | |
1279 | 1311 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| |||
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
306 | | - | |
| 306 | + | |
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
| |||
0 commit comments