- changed status to resolved
Template variable expansion uses free-identifier=? instead of bound-identifier=?
Issue #154
resolved
The following code returns incorrect values:
(import (rnrs))
(define-syntax bar
(lambda (x)
(syntax-case x ()
((_ (ts ...) (b ...))
#'(let-syntax ((buz (lambda (x)
(syntax-case x ()
((_ ts ...) #'(list ts ...))))))
(buz b ...)))
((_ (t* ...) (b ...) a as ...)
#'(bar (t* ... t) (b ...) as ...)))))
(bar () (1 2 3) 1 2 3)
;; -> (3 3 3)
;; must be (1 2 3)
This is because free-identifier=?
returns #t
with all temporary identifiers t
.
Comments (2)
-
reporter -
reporter (Was: free-identifier=? returns #t even though it not the same bindings) The fix was actually not related to
free-identifier=?
but incorrect usage offree-identifier=?
- Log in to comment
Preserving pattern variable during syntax-case rewrite (Fixes
#154)→ <<cset 2e01ebe22073>>