Commit Graph

91 Commits

Author SHA1 Message Date
544e79f533 haskell: fix string ↔ [Char] equality — palindrome 12/12, conformance 34/34 (269/269)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 18s
Haskell strings are [Char]. Calling reverse / head / length on a SX raw
string transparently produces a cons-list of char codes (via hk-str-head /
hk-str-tail in runtime.sx), but (==) then compared the original raw string
against the char-code cons-list and always returned False — so
"racecar" == reverse "racecar" was False.

Added hk-try-charlist-to-string and hk-normalize-for-eq in eval.sx; routed
== and /= through hk-normalize-for-eq so a string compares equal to any
cons-list whose elements are valid Unicode code points spelling the same
characters, and "[]" ↔ "".

palindrome.hs lifts from 9/12 → 12/12; conformance 33/34 → 34/34 programs,
266/269 → 269/269 tests.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-07 20:35:28 +00:00
f1fea0f2f1 haskell: Phase 15 — IORef (5 ops + module wiring + ioref.sx 13/13 + counter.hs 7/7 + accumulate.hs 8/8)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 53s
hk-bind-data-ioref! registers newIORef / readIORef / writeIORef /
modifyIORef / modifyIORef' under the import alias (default IORef).
Representation: dict {"hk-ioref" true "hk-value" v} allocated inside IO.
modifyIORef' uses hk-deep-force on the new value before write.

Side-effect: fixed pre-existing bug in import handler — modname was
reading (nth d 1) (the qualified flag) instead of (nth d 2). All
'import qualified … as Foo' paths were silently no-ops; map.sx unit
suite jumps from 22→26 passing.

Conformance now 33/34 programs, 266/269 tests (only pre-existing
palindrome.hs 9/12 still failing on string-as-list reversal, present
on prior commit).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-07 18:49:55 +00:00
f26f25f146 haskell: Phase 14 conformance — person.hs (7/7) + config.hs (10/10), Phase 14 complete
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 50s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 17:28:28 +00:00
63c1e17c75 haskell: Phase 14 — tests/records.sx (14/14, plan ≥12)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 49s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 17:20:30 +00:00
a4fd57cff1 haskell: Phase 14 — record patterns Foo { f = b } in case + fun-clauses
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 49s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 17:18:08 +00:00
76d141737a haskell: Phase 14 — record update r { field = v } (parser + desugar + eval)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 1m6s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 16:43:20 +00:00
9307437679 haskell: Phase 14 — record creation Foo { f = e, … } (parser + desugar)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 1m0s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 16:11:23 +00:00
b89e321007 haskell: Phase 14 — record desugar (con-rec → con-def + accessor fun-clauses)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 57s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 15:38:40 +00:00
ca9e12fc57 haskell: Phase 14 — record syntax in parser (con-rec AST node)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 1m1s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 15:07:38 +00:00
2adbc101fa haskell: Phase 13 conformance — shapes.hs (5/5), Phase 13 complete
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 1m3s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 14:38:07 +00:00
49252eaa5c haskell: Phase 13 — Num default verification (negate/abs) (+3 tests, 13/13)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 14:09:03 +00:00
ebbf0fc10c haskell: Phase 13 — Ord default verification (myMax/myMin) (+5 tests, 10/10)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 59s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 13:36:39 +00:00
8dfb3f6387 haskell: Phase 13 — Eq default verification (+5 tests, class-defaults.sx 5/5)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 1m4s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 13:08:12 +00:00
5a8c25bec7 haskell: Phase 13 — class default method registration + dispatch fallback
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 1m4s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 12:39:46 +00:00
c821e21f94 haskell: Phase 13 — where-clauses in instance bodies (desugar fix, +4 tests)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 50s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 12:18:21 +00:00
5605fe1cc2 haskell: Phase 12 conformance — uniquewords.hs (4/4) + setops.hs (8/8), Phase 12 complete
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 36s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 11:45:21 +00:00
379bb93f14 haskell: Phase 12 — tests/set.sx (17/17, plan ≥15)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 32s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 11:42:31 +00:00
7ce0c797f3 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>
2026-05-07 11:41:16 +00:00
34513908df haskell: Phase 12 — Data.Set full API (union/intersection/difference/isSubsetOf/filter/map/foldr/foldl)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 36s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 11:39:11 +00:00
208953667b haskell: Phase 12 — Data.Set skeleton (wraps Data.Map with unit values)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 35s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 11:37:39 +00:00
e6d6273265 haskell: Phase 11 conformance — wordfreq.hs (7/7) + mapgraph.hs (6/6), Phase 11 complete
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 37s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 11:36:19 +00:00
e95ca4624b haskell: Phase 11 — tests/map.sx (26/26, plan ≥20)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 34s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 11:32:55 +00:00
e1a020dc90 haskell: Phase 11 — Data.Map module wiring (import qualified ... as Map)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 44s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 11:26:44 +00:00
b0974b58c0 haskell: Phase 11 — Data.Map updating (adjust/insertWith/insertWithKey/alter)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 1m21s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 10:55:39 +00:00
6620c0ac06 haskell: Phase 11 — Data.Map transforming (foldlWithKey/foldrWithKey/mapWithKey/filterWithKey)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 1m20s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 10:28:19 +00:00
95cf653ba9 haskell: Phase 11 — Data.Map combining (unionWith/intersectionWith/difference)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 1m56s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 10:00:45 +00:00
12de24e3a0 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
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 09:32:30 +00:00
180b9009bf haskell: Phase 11 — Data.Map core operations (singleton/insert/lookup/delete/member/null)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 1m45s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 09:02:47 +00:00
a29bb6feca haskell: Phase 11 — Data.Map BST skeleton (Adams weight-balanced)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 1m6s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 08:34:42 +00:00
d2638170db haskell: Phase 10 conformance — statistics.hs (5/5) + newton.hs (5/5), Phase 10 complete
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 1m10s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 08:33:00 +00:00
882815e612 haskell: Phase 10 — Floating stub: pi, exp, log, sin, cos, ** (+6 tests, 37/37)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 08:28:11 +00:00
e27daee4a8 haskell: Phase 10 — Fractional stub: recip + fromRational (+3 tests, 31/31)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 1m21s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 08:23:04 +00:00
ef33e9a43a haskell: Phase 10 — math builtins (sqrt/floor/ceiling/round/truncate) (+6 tests, 28/28)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 1m15s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 08:01:48 +00:00
1b7bd86b43 haskell: Phase 10 — Float show with .0 suffix and scientific form (+4 tests, 22/22)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 1m8s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 07:55:54 +00:00
e5fe9ad2d4 haskell: Phase 10 — toInteger/fromInteger verified as prelude identities (+4 tests, 18/18)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 55s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 07:11:39 +00:00
2d373da06b haskell: Phase 10 — fromIntegral verified as prelude identity (+4 tests, 14/14)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 1m6s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 06:44:45 +00:00
25cf832998 haskell: Phase 10 — large integer audit, document practical 2^53 limit (10/10)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 1m9s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 06:15:56 +00:00
29542ba9d2 haskell: Phase 9 conformance — partial.hs (7/7), Phase 9 complete
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 1m4s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 05:40:03 +00:00
c2de220cce haskell: Phase 9 — tests/errors.sx (14/14, plan ≥10)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 57s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 05:11:55 +00:00
d523df30c2 haskell: Phase 9 — hk-test-error helper in testlib.sx (+2 tests, 66/66)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 1m4s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 04:43:07 +00:00
1b844f6a19 haskell: Phase 9 — hk-run-io catches errors and appends to io-lines
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 1m4s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 04:14:48 +00:00
5f758d27c1 haskell: Phase 9 — partial fns proper error messages (head []/tail []/fromJust Nothing) (+5 tests, 64/64)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 1m5s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 03:31:20 +00:00
51f57aa2fa haskell: Phase 9 — undefined in prelude + lazy CAFs (+2 tests, 59/59)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 1m7s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 03:00:29 +00:00
31308602ca haskell: Phase 9 — error builtin raises with hk-error: prefix (+2 tests, 57/57)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 58s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 02:24:45 +00:00
788e8682f5 haskell: Phase 8 conformance — showadt.hs + showio.hs (both 5/5)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 1m0s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 01:35:38 +00:00
bb134b88e3 haskell: Phase 8 — tests/show.sx expanded to 26/26 (full audit coverage)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 57s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 01:04:52 +00:00
d8dec07df3 haskell: Phase 8 — Read class stub (reads/readsPrec/read) (+3 tests, 10/10)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 53s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 00:32:38 +00:00
39c7baa44c haskell: Phase 8 — showsPrec/showParen/shows/showString stubs (+7 tests, 7/7)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 52s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 00:02:55 +00:00
ee74a396c5 haskell: Phase 8 deriving Show — verify nested-paren behavior (+4 tests, 15/15)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 51s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-06 23:28:19 +00:00
a8997ab452 haskell: Phase 8 — print x = putStrLn (show x) in prelude (replaces builtin)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 46s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-06 22:59:44 +00:00