haskell: various small improvements #714
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.