plans: tick calculator.hs + 5/5 classic programs target
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-25 18:57:59 +00:00
parent ba63cdf8c4
commit 161fa613f2

View File

@@ -86,9 +86,9 @@ Key mappings:
- [x] `sieve.hs` — lazy sieve of Eratosthenes
- [x] `quicksort.hs` — naive QS
- [x] `nqueens.hs`
- [ ] `calculator.hs` — parser combinator style expression evaluator
- [x] `calculator.hs` — parser combinator style expression evaluator
- [ ] `lib/haskell/conformance.sh` + runner; `scoreboard.json` + `scoreboard.md`
- [ ] Target: 5/5 classic programs passing
- [x] Target: 5/5 classic programs passing
### Phase 4 — Hindley-Milner inference
- [ ] Algorithm W: unification + type schemes + generalisation + instantiation
@@ -114,6 +114,15 @@ Key mappings:
_Newest first._
- **2026-04-25** — Classic program `calculator.hs`: recursive descent
expression evaluator using ADTs for tokens and results.
`data Token = TNum Int | TOp String` + `data Result = R Int [Token]`;
parser threads token lists through `R` constructors enabling nested
constructor pattern matching (`R v (TOp "+":rest)`). Handles two-level
operator precedence (* / tighter than + ) and left-associativity.
5 tests: addition, precedence, left-assoc subtraction, left-assoc
div+mul, single number. All 5 classic programs complete. 402/402 green.
- **2026-04-25** — Classic program `nqueens.hs`: backtracking n-queens via list
comprehension and multi-clause `where`. Three fixes needed: (1) `hk-eval-let`
now delegates to `hk-bind-decls!` so multi-clause `where`/`let` bindings