summaryrefslogtreecommitdiff
path: root/geiser
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-01-28 14:54:42 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-01-28 14:54:42 +0100
commit1af3138afe3641e1cf321834411830aafddd0d54 (patch)
tree2a5cb388c800d6c7da96057807c24f6a694a126e /geiser
parent98dd4d8c8ae69b19e923387b1dfe62bfe22e6f3e (diff)
downloadgeiser-guile-1af3138afe3641e1cf321834411830aafddd0d54.tar.gz
geiser-guile-1af3138afe3641e1cf321834411830aafddd0d54.tar.bz2
Guile: support for the REPL debugger
On errors, we switch to the REPL, where the debugger is active.
Diffstat (limited to 'geiser')
-rw-r--r--geiser/evaluation.scm19
1 files changed, 4 insertions, 15 deletions
diff --git a/geiser/evaluation.scm b/geiser/evaluation.scm
index 3a834bb..cd8a6f7 100644
--- a/geiser/evaluation.scm
+++ b/geiser/evaluation.scm
@@ -41,26 +41,15 @@
m))))
(define (ge:compile form module-name)
- (let* ((module (or (find-module module-name)
- (current-module)))
+ (let* ((module (or (find-module module-name) (current-module)))
(result #f)
- (captured-stack #f)
- (err #f)
(ev (lambda ()
(set! result (call-with-values
(lambda () (compile form #:env module))
(lambda vs (map object->string vs)))))))
- (let ((output
- (with-output-to-string
- (lambda ()
- (catch #t
- (lambda () (start-stack 'geiser-eval (ev)))
- (lambda args
- (set! err (apply handle-error captured-stack args)))
- (lambda args
- (set! captured-stack (make-stack #t 11 11))))))))
- (write `(,(or err (cons 'result result))
- (output . ,output)))
+ (let (#;(output (with-output-to-string ev)))
+ (ev)
+ (write `(,(cons 'result result) (output . "")))
(newline))))
(define ge:eval ge:compile)