summaryrefslogtreecommitdiff
path: root/geiser/evaluation.scm
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2009-09-23 18:03:52 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2009-09-23 18:03:52 +0200
commit4afe5ff27c7cbf6210cd4890e25c8c4bdc475849 (patch)
treeb25223495eef95f6f9dd1498060ae23636489211 /geiser/evaluation.scm
parenta32977389a81d7095d009c82d7a57f3735a54e80 (diff)
downloadgeiser-guile-4afe5ff27c7cbf6210cd4890e25c8c4bdc475849.tar.gz
geiser-guile-4afe5ff27c7cbf6210cd4890e25c8c4bdc475849.tar.bz2
Guile: bug fix: evaluation works again (1.9.3 or better required).
Diffstat (limited to 'geiser/evaluation.scm')
-rw-r--r--geiser/evaluation.scm22
1 files changed, 7 insertions, 15 deletions
diff --git a/geiser/evaluation.scm b/geiser/evaluation.scm
index 642c185..3e44834 100644
--- a/geiser/evaluation.scm
+++ b/geiser/evaluation.scm
@@ -38,29 +38,21 @@
(current-module)))
(result #f)
(captured-stack #f)
- (error #f)
+ (err #f)
(ev (lambda ()
- (save-module-excursion
- (lambda ()
- (set-current-module module)
- (set! result (call-with-values
- (lambda () (compile form))
- (lambda vs
- (map (lambda (v)
- (with-output-to-string
- (lambda () (write v))))
- vs)))))))))
+ (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! error #t)
- (apply handle-error captured-stack args))
+ (set! err (apply handle-error captured-stack args)))
(lambda args
- (set! captured-stack (make-stack #t 2 15))))))))
- (write `(,(if error result (cons 'result result))
+ (set! captured-stack (make-stack #t 2 7))))))))
+ (write `(,(or err (cons 'result result))
(output . ,output)))
(newline))))