diff options
author | Andy Wingo <wingo@pobox.com> | 2008-08-02 12:46:14 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2008-08-02 12:46:14 +0200 |
commit | 427d4a0c51e4e186fa20b7d85dccf77b5dae8c88 (patch) | |
tree | 7cbad7694c9cfa7e3d117470e0b0c3c766319481 | |
parent | 75e03dee5b21a1e2c300021e28aef3aa861b6b13 (diff) | |
download | guile-427d4a0c51e4e186fa20b7d85dccf77b5dae8c88.tar.gz |
only pass symbols to module-ref & c
* module/language/scheme/translate.scm: Make sure that we're actually
passing symbols to module-ref et al.
-rw-r--r-- | module/language/scheme/translate.scm | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/module/language/scheme/translate.scm b/module/language/scheme/translate.scm index 40ce46675..e46ef36b1 100644 --- a/module/language/scheme/translate.scm +++ b/module/language/scheme/translate.scm @@ -49,11 +49,12 @@ (define (lookup-transformer e head retrans) (let* ((mod (ghil-mod-module (ghil-env-mod e))) - (val (and=> (module-variable mod head) - (lambda (var) - ;; unbound vars can happen if the module - ;; definition forward-declared them - (and (variable-bound? var) (variable-ref var)))))) + (val (and (symbol? head) + (and=> (module-variable mod head) + (lambda (var) + ;; unbound vars can happen if the module + ;; definition forward-declared them + (and (variable-bound? var) (variable-ref var))))))) (cond ((or (primitive-macro? val) (eq? val eval-case)) (or (assq-ref primitive-syntax-table head) @@ -93,7 +94,8 @@ (else (let ((tail (map retrans tail))) - (or (try-inline-with-env e l (cons head tail)) + (or (and (symbol? head) + (try-inline-with-env e l (cons head tail))) (make-ghil-call e l (retrans head) tail))))))) ((symbol? x) |