Skip to content

Commit a9ba8c7

Browse files
committed
Improve kiln REPL
Don't print readably, and re-enable the debugger (disabled by default).
1 parent cfc07c9 commit a9ba8c7

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed

scripts/repl.lisp

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,22 @@
1010
(format *error-output* "Write ~s or send EOF to quit" :quit)
1111
(with-standard-io-syntax
1212
(let ((*print-circle* t)
13-
(uiop:*lisp-interaction* t))
14-
(loop (format *error-output* "~%> ")
15-
(let ((input (read *standard-input* nil :quit)))
16-
(if (eql input :quit)
17-
(progn
18-
(terpri *error-output*)
19-
(return))
20-
(let ((values (multiple-value-list (eval input))))
21-
(dolist (value values)
22-
(format t "~s" value)
23-
(finish-output)))))))))
13+
(*print-readably* nil)
14+
(uiop:*lisp-interaction* t)
15+
;; Re-enable the disabled debugger.
16+
#+sbcl
17+
(sb-ext:*invoke-debugger-hook* nil))
18+
(handler-bind ((error #'invoke-debugger))
19+
(loop (format *error-output* "~%> ")
20+
(let ((input (read *standard-input* nil :quit)))
21+
(if (eql input :quit)
22+
(progn
23+
(terpri *error-output*)
24+
(return))
25+
(let ((values (multiple-value-list (eval input))))
26+
(dolist (value values)
27+
(format t "~s" value)
28+
(finish-output))))))))))
2429

2530
(defun main (args)
2631
(declare (ignore args))

0 commit comments

Comments
 (0)