[honu] return eof at the repl if an eof-object is read

This commit is contained in:
Jon Rafkind 2011-09-15 17:21:15 -06:00
parent 5a28514553
commit b4a74fc12d

View File

@ -4,6 +4,8 @@
"private/honu-typed-scheme.rkt"
racket/port)
;; at the repl, honu will only read a single line at a time regardless
;; of how many expressions it contains
(define (read-one-line name input)
(define quit? #f)
(define one-line
@ -18,8 +20,7 @@
(display next)
(loop))))))
(if quit?
;; this isn't right, somehow communicate to the system that the repl should close
#'(exit)
eof
(honu-read-syntax name (open-input-string one-line))))
(provide configure)