summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--starling/repl.scm29
1 files changed, 14 insertions, 15 deletions
diff --git a/starling/repl.scm b/starling/repl.scm
index bd8f504..7c05cb6 100644
--- a/starling/repl.scm
+++ b/starling/repl.scm
@@ -86,16 +86,15 @@
(let loop ((i (- (stack-length stack) 1)))
(when (>= i 0)
(let ((frame (stack-ref stack i)))
- (print repl
- (match (frame-source frame)
- ((_ file line . column)
- (format #f "~d: In ~a:~% ~d:~d ~a"
- i file line column
- (frame-procedure-name frame)))
- (#f
- (format #f "~d: In unknown file:~% ~a"
- i
- (frame-procedure-name frame)))))
+ (match (frame-source frame)
+ ((_ file line . column)
+ (format #t "~d: In ~a:~% ~d:~d ~a~%"
+ i file line column
+ (frame-procedure-name frame)))
+ (#f
+ (format #t "~d: In unknown file:~% ~a~%"
+ i
+ (frame-procedure-name frame))))
(loop (- i 1))))))
(define-method (eval-user-text (repl <repl>))
@@ -109,11 +108,11 @@
(print-exception (current-output-port) #f
(exception-kind exception)
(exception-args exception))
- (newline))))
- (let ((tag (match (fluid-ref %stacks)
- ((_ . tag) tag)
- (_ 0))))
- (print-backtrace repl (make-stack #t 3 tag)))
+ (newline)
+ (let ((tag (match (fluid-ref %stacks)
+ ((_ . tag) tag)
+ (_ 0))))
+ (print-backtrace repl (make-stack #t 3 tag))))))
(cancel))
(lambda ()
(print repl