summaryrefslogtreecommitdiff
path: root/module/ice-9
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2012-01-30 03:02:32 -0500
committerMark H Weaver <mhw@netris.org>2012-01-30 03:02:32 -0500
commit2f3e436411b5dbb4f1a1b9d8583b348e221d5b67 (patch)
tree3281cbc41ad0e38dcf271bf74663d70e0113ea83 /module/ice-9
parent505afe28321654a5e28b0954eeda9d1a58ce2467 (diff)
downloadguile-2f3e436411b5dbb4f1a1b9d8583b348e221d5b67.tar.gz
Fix 'local-eval' when the specified environment is a module
* module/ice-9/local-eval.scm (local-wrap): Fix the (module? e) case, to reference the expression 'x' instead of the non-existent variable 'exp', as was previously done. Also use quasisyntax instead of quasiquote, so that the introduced 'lambda' is an identifier instead of a bare symbol, so that this will work in modules that have rebound 'lambda' to something else. * test-suite/tests/eval.test (local-eval): Make sure to test both 'local-eval' and 'local-compile' when the specified environment is a module.
Diffstat (limited to 'module/ice-9')
-rw-r--r--module/ice-9/local-eval.scm2
1 files changed, 1 insertions, 1 deletions
diff --git a/module/ice-9/local-eval.scm b/module/ice-9/local-eval.scm
index f01a9c655..28f30b991 100644
--- a/module/ice-9/local-eval.scm
+++ b/module/ice-9/local-eval.scm
@@ -235,7 +235,7 @@
(scope (caddr l)))
(within-nested-ellipses (datum->syntax scope name) lvl)))
(lexenv-patterns e))))
- ((module? e) `(lambda () #f ,exp))
+ ((module? e) #`(lambda () #f #,x))
(else (error "invalid lexical environment" e))))
(define (local-eval x e)