diff options
author | Andy Wingo <wingo@pobox.com> | 2009-02-02 23:36:14 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2009-02-02 23:36:14 +0100 |
commit | e94ecc68c285426544c195dc6d388e3ff0c87dd4 (patch) | |
tree | e5b8382ebc207cf9d8a01873fc6fffe004a1644f | |
parent | e311f5fa04a45e1ddc4dea4d37911c98c692848f (diff) | |
download | guile-e94ecc68c285426544c195dc6d388e3ff0c87dd4.tar.gz |
Name anonymous let- or letrec-bound procedures
* module/language/scheme/compile-ghil.scm (let, letrec): Give names to
procedures of the form (let ((foo (lambda ....)))).
-rw-r--r-- | module/language/scheme/compile-ghil.scm | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/module/language/scheme/compile-ghil.scm b/module/language/scheme/compile-ghil.scm index 19ced1df2..1213703a8 100644 --- a/module/language/scheme/compile-ghil.scm +++ b/module/language/scheme/compile-ghil.scm @@ -248,7 +248,9 @@ ;; (let ((SYM VAL) ...) BODY...) ((,bindings . ,body) (guard (valid-bindings? bindings)) - (let ((vals (map retrans (map cadr bindings)))) + (let ((vals (map (lambda (b) + (maybe-name-value! (retrans (cadr b)) (car b))) + bindings))) (call-with-ghil-bindings e (map car bindings) (lambda (vars) (make-ghil-bind e l vars vals (trans-body e l body))))))) @@ -265,7 +267,10 @@ ((,bindings . ,body) (guard (valid-bindings? bindings)) (call-with-ghil-bindings e (map car bindings) (lambda (vars) - (let ((vals (map retrans (map cadr bindings)))) + (let ((vals (map (lambda (b) + (maybe-name-value! + (retrans (cadr b)) (car b))) + bindings))) (make-ghil-bind e l vars vals (trans-body e l body))))))) (define-scheme-translator cond |