repl printing is now interruptable without exiting ikarus

This commit is contained in:
Abdulaziz Ghuloum 2008-12-03 00:52:38 -05:00
parent d35f039ca1
commit c15f3d5e0d
2 changed files with 23 additions and 13 deletions

View File

@ -69,14 +69,15 @@ description:
(display-prompt 0)
(let ([x (with-exception-handler
(lambda (ex)
(cond [(lexical-violation? ex)
(print-ex ex)
(reset k)]
[(interrupted-condition? ex)
(flush-output-port (console-output-port))
(newline (console-output-port))
(reset k)]
[else (raise-continuable ex)]))
(cond
[(lexical-violation? ex)
(print-ex ex)
(reset k)]
[(interrupted-condition? ex)
(flush-output-port (console-output-port))
(newline (console-output-port))
(reset k)]
[else (raise-continuable ex)]))
(lambda ()
(read (console-input-port))))])
(cond
@ -101,10 +102,19 @@ description:
(eval-proc x))))))
(lambda v*
(unless (andmap (lambda (v) (eq? v (void))) v*)
(for-each
(lambda (v)
(pretty-print v (console-output-port)))
v*))))]))))
(with-exception-handler
(lambda (ex)
(cond
[(interrupted-condition? ex)
(flush-output-port (console-output-port))
(newline (console-output-port))
(reset k)]
[else (raise-continuable ex)]))
(lambda ()
(for-each
(lambda (v)
(pretty-print v (console-output-port)))
v*))))))]))))
(wait eval-proc escape-k)))
(define do-new-cafe

View File

@ -1 +1 @@
1694
1695