summaryrefslogtreecommitdiff
path: root/geiser/evaluation.scm
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-10-30 22:46:12 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-10-30 22:46:12 +0200
commit0513d1cb0e502352d73ac1489c22d5e3810c48c3 (patch)
treed6aab5d95e723ff93bc4121476d22c2faa4280c8 /geiser/evaluation.scm
parent5532387d8fe568c143d007d337cc74737680c2a5 (diff)
downloadgeiser-guile-0513d1cb0e502352d73ac1489c22d5e3810c48c3.tar.gz
geiser-guile-0513d1cb0e502352d73ac1489c22d5e3810c48c3.tar.bz2
Guile: using meta-commands to talk with Guile
Diffstat (limited to 'geiser/evaluation.scm')
-rw-r--r--geiser/evaluation.scm17
1 files changed, 11 insertions, 6 deletions
diff --git a/geiser/evaluation.scm b/geiser/evaluation.scm
index 1cc21a7..ef082db 100644
--- a/geiser/evaluation.scm
+++ b/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 ()