unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Andreas Rottmann <a.rottmann@gmx.at>
To: Guile Developers <guile-devel@gnu.org>
Subject: Quasisyntax broken?
Date: Fri, 03 Jul 2009 02:04:26 +0200	[thread overview]
Message-ID: <87ocs2y6lx.fsf@delenn.lan> (raw)

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	other threads:[~2009-07-03  0:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-03  0:04 Andreas Rottmann [this message]
2009-07-23 21:31 ` Quasisyntax broken? Andy Wingo
2009-07-23 22:35   ` Andreas Rottmann
2009-07-23 22:48     ` Andy Wingo
2009-07-25 21:30       ` Andreas Rottmann
2009-07-26 13:15         ` Ludovic Courtès
2009-07-26 16:30         ` Andy Wingo
2009-07-26 22:06           ` Ludovic Courtès
2009-07-27 22:51             ` Neil Jerram
2009-08-20 21:19         ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ocs2y6lx.fsf@delenn.lan \
    --to=a.rottmann@gmx.at \
    --cc=guile-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).