-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrepl.arc
More file actions
26 lines (24 loc) · 739 Bytes
/
Copy pathrepl.arc
File metadata and controls
26 lines (24 loc) · 739 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
(__load "basic-fns.arc.so")
(__load "basic-macs.arc.so")
(__load "lib.arc.so")
(__load "print.arc.so")
(__load "read.arc.so")
(__load "comp-utils.arc.so")
(__load "code-walker.arc.so")
(__load "transformations.arc.so")
(__load "comp.arc.so")
(with (in (stdin-stream)
out (stdout-stream))
(def repl ()
(ccc [set __error_continuation
(fn (s)
(if (consp s)
(print (make-string "Error: expected type " (car s)
" but got type " (cdr s)))
(print (make-string "Error: " s)))
(__print_backtrace)
(_ nil))])
(write-string "arc> " out)
(print (eval (read/tbl in read-table)))
(repl)))
(repl)