repl printing is now interruptable without exiting ikarus
This commit is contained in:
parent
d35f039ca1
commit
c15f3d5e0d
|
@ -69,14 +69,15 @@ description:
|
||||||
(display-prompt 0)
|
(display-prompt 0)
|
||||||
(let ([x (with-exception-handler
|
(let ([x (with-exception-handler
|
||||||
(lambda (ex)
|
(lambda (ex)
|
||||||
(cond [(lexical-violation? ex)
|
(cond
|
||||||
(print-ex ex)
|
[(lexical-violation? ex)
|
||||||
(reset k)]
|
(print-ex ex)
|
||||||
[(interrupted-condition? ex)
|
(reset k)]
|
||||||
(flush-output-port (console-output-port))
|
[(interrupted-condition? ex)
|
||||||
(newline (console-output-port))
|
(flush-output-port (console-output-port))
|
||||||
(reset k)]
|
(newline (console-output-port))
|
||||||
[else (raise-continuable ex)]))
|
(reset k)]
|
||||||
|
[else (raise-continuable ex)]))
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(read (console-input-port))))])
|
(read (console-input-port))))])
|
||||||
(cond
|
(cond
|
||||||
|
@ -101,10 +102,19 @@ description:
|
||||||
(eval-proc x))))))
|
(eval-proc x))))))
|
||||||
(lambda v*
|
(lambda v*
|
||||||
(unless (andmap (lambda (v) (eq? v (void))) v*)
|
(unless (andmap (lambda (v) (eq? v (void))) v*)
|
||||||
(for-each
|
(with-exception-handler
|
||||||
(lambda (v)
|
(lambda (ex)
|
||||||
(pretty-print v (console-output-port)))
|
(cond
|
||||||
v*))))]))))
|
[(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)))
|
(wait eval-proc escape-k)))
|
||||||
|
|
||||||
(define do-new-cafe
|
(define do-new-cafe
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
1694
|
1695
|
||||||
|
|
Loading…
Reference in New Issue