summaryrefslogtreecommitdiff
path: root/scheme/guile/geiser/evaluation.scm
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-11-11 16:28:52 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-11-11 16:28:52 +0100
commit70cfa5b379e90e6899c7e1a210a5c468dc578479 (patch)
tree75237d0ac9844d11b61147d77182f78e60b81f76 /scheme/guile/geiser/evaluation.scm
parent8d1e1c47563131cd0f52f0cc02fa0b23eebd2227 (diff)
parent5a7c0553d5b60cd9475ecb33c5d65b76789757e0 (diff)
downloadgeiser-guile-70cfa5b379e90e6899c7e1a210a5c468dc578479.tar.gz
geiser-guile-70cfa5b379e90e6899c7e1a210a5c468dc578479.tar.bz2
Merge branch 'guile-meta' into meta-reconnection
Diffstat (limited to 'scheme/guile/geiser/evaluation.scm')
-rw-r--r--scheme/guile/geiser/evaluation.scm17
1 files changed, 11 insertions, 6 deletions
diff --git a/scheme/guile/geiser/evaluation.scm b/scheme/guile/geiser/evaluation.scm
index 1cc21a7..ef082db 100644
--- a/scheme/guile/geiser/evaluation.scm
+++ b/scheme/guile/geiser/evaluation.scm
@@ -10,8 +10,8 @@
;; Start date: Mon Mar 02, 2009 02:46
(define-module (geiser evaluation)
- #:export (compile/warns
- compile/no-warns
+ #:export (ge:compile
+ ge:eval
ge:macroexpand
ge:compile-file
ge:load-file
@@ -71,10 +71,7 @@
(set! result (thunk)))))))
(write-result result output)))
-(define (compile/no-warns form module)
- (compile* form module '()))
-
-(define (compile/warns form module)
+(define (ge:compile form module)
(compile* form module compile-opts))
(define (compile* form module-name opts)
@@ -92,6 +89,14 @@
(lambda vs (map object->string vs))))))
(call-with-result ev)))
+(define (ge:eval form module-name)
+ (let* ((module (or (find-module module-name) (current-module)))
+ (ev (lambda ()
+ (call-with-values
+ (lambda () (eval form module))
+ (lambda vs (map object->string vs))))))
+ (call-with-result ev)))
+
(define (ge:compile-file path)
(call-with-result
(lambda ()