commit 5e44da88ee936974315c45d80bca75d68ea7535b
parent a44e4212613c8e9ab914306db45964b27acc2567
Author: Ed van Bruggen <edvb@uw.edu>
Date: Mon, 23 Dec 2019 17:45:58 -0800
Flush simple REPL prompt before getting input
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tibs/repl.tsp b/tibs/repl.tsp
@@ -2,6 +2,7 @@
(print "> ")
(let ((expr (parse (read))))
(unless (and (pair? expr) (= (car expr) 'quit))
+ ; TODO push! ans to stack of outputs
(let ((ans (eval expr)))
(unless (void? ans)
(disp-string ans))
@@ -9,5 +10,6 @@
;; simple repl, only requires io c library
(define (repl-simple)
- (write 'stdout "> " (eval (parse (read))) "\n")
+ (write 'stdout "> ")
+ (write 'stdout (eval (parse (read))) "\n")
(repl-simple))