haskell: typecheck.sx 10/15→15/15 + plan Phases 20-22 (HM gaps, classes, integration)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 58s
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 58s
Five "typed ok: …" tests in tests/typecheck.sx compared an unforced thunk against an integer/list. The untyped-path convention is hk-deep-force on the result; hk-run-typed follows the same shape but the tests omitted that wrap. Added hk-deep-force around hk-run-typed in those five tests. typecheck.sx now 15/15; infer.sx still 75/75. Plan adds three phases capturing the remaining type-system work: - Phase 20: Algorithm W gaps (case, do, record accessors, expression annotations). - Phase 21: type classes with qualified types ([Eq a] => …) and constraint propagation, integrated with the existing dict-passing evaluator. - Phase 22: typecheck-then-run as the default conformance path, with a ≥ 30/36 typechecking threshold before swap. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -16,15 +16,18 @@
|
||||
true)))
|
||||
|
||||
;; ─── Valid programs pass through ─────────────────────────────────────────────
|
||||
(hk-test "typed ok: simple arithmetic" (hk-run-typed "main = 1 + 2") 3)
|
||||
(hk-test "typed ok: simple arithmetic"
|
||||
(hk-deep-force (hk-run-typed "main = 1 + 2")) 3)
|
||||
|
||||
(hk-test "typed ok: boolean" (hk-run-typed "main = True") (list "True"))
|
||||
(hk-test "typed ok: boolean"
|
||||
(hk-deep-force (hk-run-typed "main = True")) (list "True"))
|
||||
|
||||
(hk-test "typed ok: let binding" (hk-run-typed "main = let x = 1 in x + 2") 3)
|
||||
(hk-test "typed ok: let binding"
|
||||
(hk-deep-force (hk-run-typed "main = let x = 1 in x + 2")) 3)
|
||||
|
||||
(hk-test
|
||||
"typed ok: two independent fns"
|
||||
(hk-run-typed "f x = x + 1\nmain = f 5")
|
||||
(hk-deep-force (hk-run-typed "f x = x + 1\nmain = f 5"))
|
||||
6)
|
||||
|
||||
;; ─── Untypeable programs are rejected ────────────────────────────────────────
|
||||
@@ -76,7 +79,7 @@
|
||||
|
||||
(hk-test
|
||||
"run-typed sig ok: Int declared matches"
|
||||
(hk-run-typed "main :: Int\nmain = 1 + 2")
|
||||
(hk-deep-force (hk-run-typed "main :: Int\nmain = 1 + 2"))
|
||||
3)
|
||||
|
||||
{:fails hk-test-fails :pass hk-test-pass :fail hk-test-fail}
|
||||
Reference in New Issue
Block a user