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:
parent
79962a1e17
commit
e0d52cafec
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user