haskell: Phase 11 — tests/map.sx (26/26, plan ≥20)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 34s
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 34s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -190,9 +190,12 @@ No OCaml changes are needed. The view type is fully representable as an SX dict.
|
||||
- [x] Updating: `adjust`, `insertWith`, `insertWithKey`, `alter`.
|
||||
- [x] Module wiring: `import Data.Map` and `import qualified Data.Map as Map`
|
||||
resolve to the `map.sx` namespace dict in the eval import handler.
|
||||
- [ ] Unit tests in `lib/haskell/tests/map.sx` (≥ 20 tests: empty, singleton,
|
||||
insert + lookup hit/miss, delete root, fromList with duplicates,
|
||||
toAscList ordering, unionWith, foldlWithKey).
|
||||
- [x] Unit tests in `lib/haskell/tests/map.sx` (26 tests, well past ≥20 target:
|
||||
empty/singleton/insert/lookup hit&miss/overwrite/delete/member at the SX
|
||||
level, fromList with duplicates last-wins, toAscList ordering, elems in
|
||||
order, unionWith/intersectionWith/difference, foldlWithKey/mapWithKey/
|
||||
filterWithKey, adjust/insertWith/alter, plus 4 end-to-end tests via
|
||||
`import qualified Data.Map as Map`.)
|
||||
- [ ] Conformance programs:
|
||||
- `wordfreq.hs` — word-frequency histogram using `Data.Map`. Source from
|
||||
Rosetta Code "Word frequency" Haskell entry.
|
||||
@@ -304,6 +307,12 @@ No OCaml changes are needed. The view type is fully representable as an SX dict.
|
||||
|
||||
_Newest first._
|
||||
|
||||
**2026-05-07** — Phase 11 unit tests `tests/map.sx` (26/26):
|
||||
- 22 SX-level direct calls (empty/singleton/insert/lookup/delete/member/
|
||||
fromList+duplicates/toAscList/elems/unionWith/intersectionWith/difference/
|
||||
foldlWithKey/mapWithKey/filterWithKey/adjust/insertWith/alter) plus 4
|
||||
end-to-end via `import qualified Data.Map as Map`. Plan asked for ≥20.
|
||||
|
||||
**2026-05-07** — Phase 11 module wiring: `import Data.Map`:
|
||||
- Added `hk-bind-data-map!` helper in `eval.sx` that registers
|
||||
`<alias>.empty/singleton/insert/lookup/member/size/null/delete` as Haskell
|
||||
|
||||
Reference in New Issue
Block a user