haskell: Phase 11 — Data.Map bulk ops (fromList/toList/toAscList/keys/elems)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 1m58s
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 1m58s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -184,7 +184,7 @@ No OCaml changes are needed. The view type is fully representable as an SX dict.
|
||||
Leaf: `("Map-Empty")`.
|
||||
- [x] Core operations: `empty`, `singleton`, `insert`, `lookup`, `delete`,
|
||||
`member`, `size`, `null`.
|
||||
- [ ] Bulk operations: `fromList`, `toList`, `toAscList`, `keys`, `elems`.
|
||||
- [x] Bulk operations: `fromList`, `toList`, `toAscList`, `keys`, `elems`.
|
||||
- [ ] Combining: `unionWith`, `intersectionWith`, `difference`.
|
||||
- [ ] Transforming: `foldlWithKey`, `foldrWithKey`, `mapWithKey`, `filterWithKey`.
|
||||
- [ ] Updating: `adjust`, `insertWith`, `insertWithKey`, `alter`.
|
||||
@@ -304,6 +304,14 @@ No OCaml changes are needed. The view type is fully representable as an SX dict.
|
||||
|
||||
_Newest first._
|
||||
|
||||
**2026-05-07** — Phase 11 bulk operations (fromList/toList/toAscList/keys/elems):
|
||||
- `hk-map-from-list` uses SX `reduce` — left-to-right, so duplicates resolve
|
||||
with last-wins (matches GHC `fromList`). `to-asc-list` is in-order recursive
|
||||
traversal returning `(list (list k v) ...)`. `to-list` aliases `to-asc-list`.
|
||||
`keys` and `elems` are similar in-order extracts. All take SX-level pairs;
|
||||
the Haskell-layer wiring (next iterations) translates Haskell cons + tuple
|
||||
representations.
|
||||
|
||||
**2026-05-07** — Phase 11 core operations on `Data.Map` BST:
|
||||
- Added `hk-map-singleton`, `hk-map-insert`, `hk-map-lookup`, `hk-map-delete`,
|
||||
`hk-map-member`, `hk-map-null`. Insert recurses with `hk-map-balance` to
|
||||
|
||||
Reference in New Issue
Block a user