Hi!

Playing around with Guile's now-in-core syntax-case support (using Git
HEAD as of today), I found that quasisyntax seems quite broken:

(define-syntax test
  (lambda (stx)
    (syntax-case stx ()
      ((_ id body ...)
       #`(let ((id #,(symbol->string
                      (syntax->datum #'id))))
           body ...)))))

[...]
ERROR: In procedure sc-expand:
ERROR: reference to pattern variable outside syntax form in id
scheme@(guile-user)>

Feeding that macro into Ikarus, Ypsilon or plt-r6rs suceeds, and
produces the expected results:

> (define-syntax test
    (lambda (stx)
      (syntax-case stx ()
        ((_ id body ...)
         #`(let ((id #,(symbol->string
                        (syntax->datum #'id))))
             body ...)))))
> (test foo foo)
"foo"


Reply via email to