Files
rose-ash/lib/haskell/scoreboard.md
giles e83c01cdcc
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 44s
haskell: Phase 16 — exception handling (catch/try/throwIO/evaluate/handle/throw)
hk-bind-exceptions! in eval.sx registers throwIO, throw, evaluate, catch,
try, handle, displayException. SomeException constructor pre-registered
in runtime.sx (arity 1, type SomeException).

throwIO and the existing error primitive both raise via SX `raise` with a
uniform "hk-error: msg" string. catch/try/handle parse it back into a
SomeException via hk-exception-of, which strips nested
'Unhandled exception: "..."' host wraps (CEK's host_error formatter) and
the "hk-error: " prefix.

catch and handle evaluate the handler outside the guard scope (build an
"ok"/"exn" outcome tag inside guard, then dispatch outside) so that a
re-throw from the handler propagates past this catch — matching Haskell
semantics rather than infinite-looping in the same guard.

14 unit tests in tests/exceptions.sx (catch success, catch error, try
Right/Left, handle, throwIO + catch/try, evaluate, nested catch, do-bind
through catch, branch on try result, IORef-mutating handler).

Conformance: safediv.hs (8/8) and trycatch.hs (8/8). Scoreboard now
285/285 tests, 36/36 programs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 00:17:46 +00:00

44 lines
1.2 KiB
Markdown

# Haskell-on-SX Scoreboard
Updated 2026-05-08 · Phase 6 (prelude extras + 18 programs)
| Program | Tests | Status |
|---------|-------|--------|
| fib.hs | 2/2 | ✓ |
| sieve.hs | 2/2 | ✓ |
| quicksort.hs | 5/5 | ✓ |
| nqueens.hs | 2/2 | ✓ |
| calculator.hs | 5/5 | ✓ |
| collatz.hs | 11/11 | ✓ |
| palindrome.hs | 12/12 | ✓ |
| maybe.hs | 12/12 | ✓ |
| fizzbuzz.hs | 12/12 | ✓ |
| anagram.hs | 9/9 | ✓ |
| roman.hs | 14/14 | ✓ |
| binary.hs | 12/12 | ✓ |
| either.hs | 12/12 | ✓ |
| primes.hs | 12/12 | ✓ |
| zipwith.hs | 9/9 | ✓ |
| matrix.hs | 8/8 | ✓ |
| wordcount.hs | 10/10 | ✓ |
| powers.hs | 14/14 | ✓ |
| caesar.hs | 8/8 | ✓ |
| runlength-str.hs | 9/9 | ✓ |
| showadt.hs | 5/5 | ✓ |
| showio.hs | 5/5 | ✓ |
| partial.hs | 7/7 | ✓ |
| statistics.hs | 5/5 | ✓ |
| newton.hs | 5/5 | ✓ |
| wordfreq.hs | 7/7 | ✓ |
| mapgraph.hs | 6/6 | ✓ |
| uniquewords.hs | 4/4 | ✓ |
| setops.hs | 8/8 | ✓ |
| shapes.hs | 5/5 | ✓ |
| person.hs | 7/7 | ✓ |
| config.hs | 10/10 | ✓ |
| counter.hs | 7/7 | ✓ |
| accumulate.hs | 8/8 | ✓ |
| safediv.hs | 8/8 | ✓ |
| trycatch.hs | 8/8 | ✓ |
| **Total** | **285/285** | **36/36 programs** |