diff options
author | Andy Wingo <wingo@pobox.com> | 2011-08-17 22:35:24 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2011-08-17 22:35:24 +0200 |
commit | 2844ab856427936aff535103195b3553cfa0d393 (patch) | |
tree | 9dfe11584ec82ab08bcff0bdb5945f6d13d9db1e | |
parent | 8761623524d767e6e355f0de4c3be426ed3c8b09 (diff) | |
download | guile-2844ab856427936aff535103195b3553cfa0d393.tar.gz |
fix recursive define-inlinable expansions
* module/ice-9/boot-9.scm (define-inlinable): Prevent expansion from
diverging by using fluid-let-syntax, as Dybvig suggests.
-rw-r--r-- | module/ice-9/boot-9.scm | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/module/ice-9/boot-9.scm b/module/ice-9/boot-9.scm index 1ddb0ff07..8a938ec7d 100644 --- a/module/ice-9/boot-9.scm +++ b/module/ice-9/boot-9.scm @@ -3728,13 +3728,15 @@ module '(ice-9 q) '(make-q q-length))}." ((args ...) (generate-temporaries #'(formals ...)))) #`(begin (define (proc-name formals ...) - body ...) + (fluid-let-syntax ((name (identifier-syntax proc-name))) + body ...)) (define-syntax name (lambda (x) (syntax-case x () ((_ args ...) - #'((lambda (formals ...) - body ...) + #'((fluid-let-syntax ((name (identifier-syntax proc-name))) + (lambda (formals ...) + body ...)) args ...)) (_ (identifier? x) |