1
1
mirror of https://github.com/kanaka/mal.git synced 2024-09-11 13:55:55 +03:00

explicit error reporting in step8

This commit is contained in:
Fabian 2021-04-05 17:45:39 +02:00 committed by Joel Martin
parent 79962a1e17
commit e0d52cafec

View File

@ -77,8 +77,11 @@ fun print f =
fun rep e s =
s |> read |> eval e |> print
handle Nothing => ""
| e => "ERROR: " ^ (exnMessage e)
handle Nothing => ""
| SyntaxError msg => "SYNTAX ERROR: " ^ msg
| NotApplicable msg => "CANNOT APPLY: " ^ msg
| NotDefined msg => "NOT DEFINED: " ^ msg
| e => "ERROR: " ^ (exnMessage e)
val initEnv = ENV (NS (ref [])) |> bind identity coreNs