syntax-rules problem

Helmut Eller <[email protected]>
Newsgroups gmane.lisp.scheme.scheme48
Message-ID <[email protected]>
I have some trouble to understand what's wrong with the following macro:

  (begin
    (define-syntax define-a
      (syntax-rules ()
        ((_) (define a 0))))
    (define-a)
    a)

I would expect that after evaluating (define-a), a is defined
and that the entire form would return 0. 

However, Scheme48 (version 1.8) signals an undefined variable error.
Is this a bug or a feature?

Helmut.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.