Skip to content

Commit b074678

Browse files
committed
docs: CHANGELOG v0.19.12 — pattern-destructure + Dict-of-records codegen fixes (#170-#173)
1 parent 60837e7 commit b074678

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,40 @@ Notable user-visible changes. Keep this file additive — never rewrite history.
1111
> (e.g. `### ⚠ Breaking changes`, `### Migration`). Keep migration steps concrete
1212
> and copy-pasteable — this is the text a user sees the moment they upgrade.
1313
14+
## v0.19.12 — codegen: pattern-destructure + Dict-of-records correctness (2026-08-08)
15+
16+
### Fixed
17+
18+
- **Tuple/record pattern destructuring on an erased subject (#170, #172).** A
19+
tuple pattern whose subject arrived type-erased — a callback param a
20+
higher-order function erases (`List.foldr (\x (a, b) -> …)`), a `let`/`case`
21+
over an `any`-typed value — emitted `_t0.V0 undefined (type any has no field
22+
V0)` and failed `go build`. Same class for a record pattern on an erased ADT
23+
payload (`case status of Loaded { x, y } -> …`). The tuple and record pattern
24+
arms now read their fields reflectively (`rt.TupleField` / `rt.Field`) when the
25+
subject is erased, matching the `Cons`/`List`/`fst`/`snd` arms that already did.
26+
- **Nested constructor pattern on a generic ADT payload (#172).** Matching
27+
`Loaded (Just xs)` where `Loaded`'s payload is a generic `a` narrowed the
28+
payload to its nominal before testing the inner pattern, closing
29+
`_v.V0.Tag undefined`.
30+
- **Row-polymorphic record update through `foldl`/`foldr` dropped fields (#171).**
31+
A record updated inside a fold callback (`\item acc -> { acc | value = … }`)
32+
was lowered to a subset struct that dropped the fields the callback didn't
33+
touch, so a fold accumulator came back with those fields zeroed. Now preserved.
34+
- **`Dict k (List Record)` correctness (#173).** Three defects, all fixed:
35+
- an annotated `Dict k (List Record)` returned an **empty** Dict at runtime
36+
(the typed-map narrow dropped every entry whose value needed a reflect
37+
narrow);
38+
- `Dict.keys` / `Dict.toList` on a `Dict Int _` returned the stringified keys
39+
narrowed to `0` (`[0, 0, …]`) — `Dict.keys` now reconstructs the typed keys
40+
like `Dict.toList` already did;
41+
- a record stored in the Dict's value list dropped the fields the builder
42+
lambda didn't access (`item.name` came back `""`). More broadly, a record
43+
held as an open-row subset view no longer silently loses its un-accessed
44+
fields when stored in any container and read back.
45+
46+
The workaround from the issue (dropping the annotation) is no longer needed.
47+
1448
## v0.19.10 — Sky.Live: navigation scrolls the new page to the top (2026-08-04)
1549

1650
### Fixed

0 commit comments

Comments
 (0)