diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-06-16 23:14:34 +0200 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-06-16 23:14:34 +0200 |
commit | 547363acef3c40350382bea812a533c6dbd532cc (patch) | |
tree | 99514e16ede6eb84f15c1baac6b4a45b8e97aa96 /scheme | |
parent | 230ca2d12926ecda1fe2946e2726079fcbd05ef4 (diff) | |
download | geiser-guile-547363acef3c40350382bea812a533c6dbd532cc.tar.gz geiser-guile-547363acef3c40350382bea812a533c6dbd532cc.tar.bz2 |
PLT: Output included in retorts.
Diffstat (limited to 'scheme')
-rw-r--r-- | scheme/plt/geiser/eval.ss | 16 |
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) |