haskell: Phase 12 — Data.Set module wiring (import qualified Data.Set as Set)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 33s

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-07 11:41:16 +00:00
parent 34513908df
commit 7ce0c797f3
4 changed files with 104 additions and 2 deletions

View File

@@ -209,7 +209,7 @@ No OCaml changes are needed. The view type is fully representable as an SX dict.
- [x] API: `empty`, `singleton`, `insert`, `delete`, `member`, `fromList`,
`toList`, `toAscList`, `size`, `null`, `union`, `intersection`, `difference`,
`isSubsetOf`, `filter`, `map`, `foldr`, `foldl'`.
- [ ] Module wiring: `import Data.Set` / `import qualified Data.Set as Set`.
- [x] Module wiring: `import Data.Set` / `import qualified Data.Set as Set`.
- [ ] Unit tests in `lib/haskell/tests/set.sx` (≥ 15 tests: empty, insert,
member hit/miss, delete, fromList deduplication, union, intersection,
difference, isSubsetOf).
@@ -307,6 +307,16 @@ No OCaml changes are needed. The view type is fully representable as an SX dict.
_Newest first._
**2026-05-07** — Phase 12 module wiring: `import Data.Set`:
- New `hk-bind-data-set!` registers `Set.empty/singleton/insert/delete/
member/size/null/union/intersection/difference/isSubsetOf` as Haskell
builtins.
- Import handler now dispatches on modname: `Data.Map` → `hk-bind-data-map!`,
`Data.Set` → `hk-bind-data-set!`. Default alias is now derived from the
modname suffix instead of being hardcoded `Map` (was a bug for `Data.Set`).
- `test.sh` and `conformance.sh` load `set.sx` after `map.sx`.
- Verified `Set.size`, `Set.member`, `Set.union`, `Set.insert` from Haskell.
**2026-05-07** — Phase 12 Data.Set full API:
- Added `from-list`/`union`/`intersection`/`difference`/`is-subset-of`/
`filter`/`map`/`foldr`/`foldl` — all delegate to the corresponding