summaryrefslogtreecommitdiff
path: root/scheme/plt
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2009-06-16 23:14:34 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2009-06-16 23:14:34 +0200
commit547363acef3c40350382bea812a533c6dbd532cc (patch)
tree99514e16ede6eb84f15c1baac6b4a45b8e97aa96 /scheme/plt
parent230ca2d12926ecda1fe2946e2726079fcbd05ef4 (diff)
downloadgeiser-chez-547363acef3c40350382bea812a533c6dbd532cc.tar.gz
geiser-chez-547363acef3c40350382bea812a533c6dbd532cc.tar.bz2
PLT: Output included in retorts.
Diffstat (limited to 'scheme/plt')
-rw-r--r--scheme/plt/geiser/eval.ss16
1 files changed, 9 insertions, 7 deletions
diff --git a/scheme/plt/geiser/eval.ss b/scheme/plt/geiser/eval.ss
index 8022a4c..ec86370 100644
--- a/scheme/plt/geiser/eval.ss
+++ b/scheme/plt/geiser/eval.ss
@@ -46,9 +46,8 @@
(vector-ref (struct->vector e) 0))
(define (set-last-error e)
- (set! last-result `((error (key . ,(exn-key e))
- (subr)
- (msg . ,(exn-message e))))))
+ (set! last-result `((error (key . ,(exn-key e)))
+ (output . ,(exn-message e)))))
(define (set-last-result v . vs)
(set! last-result `((result ,v ,@vs))))
@@ -57,10 +56,13 @@
(set-last-result (void))
(with-handlers ((exn? set-last-error))
(update-module-cache spec form)
- (call-with-values
- (lambda () (eval form (module-spec->namespace spec)))
- set-last-result))
- last-result)
+ (let ((out
+ (with-output-to-string
+ (lambda ()
+ (call-with-values
+ (lambda () (eval form (module-spec->namespace spec)))
+ set-last-result)))))
+ (append last-result `((output . ,out))))))
(define compile-in eval-in)