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>
This commit is contained in:
2026-05-07 00:32:38 +00:00
parent 39c7baa44c
commit d8dec07df3
3 changed files with 25 additions and 2 deletions

View File

@@ -41,4 +41,19 @@
"buildJust3 s = showString \"Just \" (shows 3 s)\nmain = showParen True buildJust3 \"\""))
"(Just 3)")
(hk-test
"reads: stub returns empty list (null-check)"
(hk-deep-force (hk-run "main = show (null (reads \"42\"))"))
"True")
(hk-test
"readsPrec: stub returns empty list"
(hk-deep-force (hk-run "main = show (null (readsPrec 0 \"True\"))"))
"True")
(hk-test
"reads: type-checks in expression context (length)"
(hk-deep-force (hk-run "main = show (length (reads \"abc\"))"))
"0")
{:fails hk-test-fails :pass hk-test-pass :fail hk-test-fail}