diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2010-01-28 14:54:42 +0100 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2010-01-28 14:54:42 +0100 |
commit | 1af3138afe3641e1cf321834411830aafddd0d54 (patch) | |
tree | 2a5cb388c800d6c7da96057807c24f6a694a126e | |
parent | 98dd4d8c8ae69b19e923387b1dfe62bfe22e6f3e (diff) | |
download | geiser-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.
-rw-r--r-- | geiser/evaluation.scm | 19 |
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) |