From c7317beca603d1a43b2490ba91e1a9df9779eafe Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Thu, 10 Jun 2010 13:41:44 +0200 Subject: [PATCH] bind debugging i/o ports in start-repl * module/system/repl/repl.scm (start-repl): If the debugging ports are unbound, bind them to the current i/o ports. Allows errors within with-output-to-foo / with-input-from-foo to be sensibly debugged. --- module/system/repl/repl.scm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/module/system/repl/repl.scm b/module/system/repl/repl.scm index 697d6a1b5..523f3bb8f 100644 --- a/module/system/repl/repl.scm +++ b/module/system/repl/repl.scm @@ -68,6 +68,10 @@ (if welcome (repl-welcome repl)) (with-fluids ((*repl-level* level) + (*debug-input-port* + (or (fluid-ref *debug-input-port*) (current-input-port))) + (*debug-output-port* + (or (fluid-ref *debug-output-port*) (current-output-port))) (the-last-stack #f)) (let prompt-loop () (let ((exp (prompting-meta-read repl)))