Skip to content

Conversation

@asarhaddon
Copy link
Contributor

Core, steps: flush standard output before read instead of after print.

Core: merge num_op and cmp_op templates.

Types, Core: use a specific type for map keys.
Fix "get nil :k" (for consistency).
Fix "contains? nil :k" (it was accepting symbols instead of keywords). Remove an unneeded key check in decodeKey.
Move encodeKey from Types.hs to Core.hs.

Env.hs, steps:
Replace the complex and fragile part of c9c504a creating two sorts of environments with mutable environments, closer to the guide. Move env_apply from Env.hs to stepA_mal.

Makefile:
Remove targets building the last implemented step. Link with readline (explicitly).
Add extra compiler warnings.
Refine the Make dependencies.

run:
Stop requiring bash.

steps:
Import all functions from Env module instead of duplicating the export list. Simplify mal/try* with haskell/catchError.
Merge rep into repl_loop for readability.
Print errors during startup (they were ignored).
Only load readline history in interactive mode.

@asarhaddon asarhaddon force-pushed the haskell branch 3 times, most recently from 0e2c515 to e05c12e Compare July 7, 2025 06:49
@kanaka
Copy link
Owner

kanaka commented Jul 11, 2025

Looks like the new tests found latent bugs in c.2, chuck, and jq (io failure is known and rust issue is a floating dep unrelated that I'm working on fixing). If you split the test changes out into a different PR, I'll be happy to merge the Haskell fixups which look good to go.

Remove targets building the last implemented step.
Link with readline (explicitly).
Add extra compiler warnings.
Refine the Make dependencies.
The 'error' function was not reporting anything.
Fix "get nil :k" and "contains? nil :k" as a side effect.
Remove an unneeded check from decodeKey.
Replace the complex and fragile part of c9c504a creating two sorts of
environments with mutable environments.
This is both more simple and closer to the guide.
Move env_apply from Env.hs to stepA_mal.
Simplify mal/try* with haskell/catchError.
Merge rep into repl_loop for readability.
Only load readline history in interactive mode.
@kanaka kanaka merged commit f15b22b into kanaka:master Aug 1, 2025
4 checks passed
@asarhaddon asarhaddon deleted the haskell branch August 8, 2025 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants