haskell: inference unit tests — 55+ expressions, Phase 4 complete (+16 tests, 492/492)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 45s
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 45s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -96,7 +96,7 @@ Key mappings:
|
||||
- [x] Reject untypeable programs that phase 3 was accepting
|
||||
- [x] Type-sig checking: user writes `f :: Int -> Int`; verify
|
||||
- [x] Let-polymorphism
|
||||
- [ ] Unit tests: inference for 50+ expressions
|
||||
- [x] Unit tests: inference for 50+ expressions
|
||||
|
||||
### Phase 5 — typeclasses (dictionary passing)
|
||||
- [ ] `class` / `instance` declarations
|
||||
@@ -114,6 +114,14 @@ Key mappings:
|
||||
|
||||
_Newest first._
|
||||
|
||||
- **2026-05-05** — Phase 4 inference unit tests (50+ expressions). Added 16 new
|
||||
`hk-t` expression tests to `tests/infer.sx`: nested application (`not(not True)`,
|
||||
`negate(negate 1)`), bool/mixed lambdas (`\\x->\\y->x&&y`, `\\x->x==1`),
|
||||
let variants (if-in-let, not-in-let, tuple-in-let, nested let, chain application),
|
||||
more if expressions, 2-element tuples, and list operations on Bool lists.
|
||||
infer.sx now has 75 tests covering 55+ distinct expression forms. Phase 4
|
||||
complete. 492/492 green.
|
||||
|
||||
- **2026-05-05** — Phase 4 let-polymorphism tests. `hk-w-let` already
|
||||
generalises let-bound types with `hk-generalise` before adding them to the
|
||||
env, so `id :: ∀a. a→a` is instantiated independently at each use site.
|
||||
|
||||
Reference in New Issue
Block a user