scsh-users
[Top] [All Lists]

Re: prefix on syntax-rules

To: Anthony Carrico <acarrico@memebeam.org>
Subject: Re: prefix on syntax-rules
From: Martin Gasbichler <gasbichl@informatik.uni-tuebingen.de>
Date: Tue, 21 Sep 2004 09:30:34 +0200
Cc: scsh <scsh-users@scsh.net>
List-id: <scsh-users.list-id.scsh.net>
Anthony Carrico <acarrico@memebeam.org> writes:

> I noticed something a little strange:
>
> (define-structure strange
>   (export)
>   (open (with-prefix scheme scheme/))
>   (begin
>     (scheme/define-syntax
>      foo
>      ;; for some reason, syntax-rules doesn't cache the scheme/ prefix:
>      (syntax-rules () ((_) "strange")))
>
>     (scheme/display (foo))
>     (scheme/newline)))

Well, I would regard SYNTAX-RULES as a keyword local to
DEFINE-SYNTAX. SYNTAX-RULES itself is not exported by SCHEME. So the
behaviour you observe is the same as in

(define-structure strange
  (export)
  (open (with-prefix scheme scheme/))
  (begin (scheme/define foo (scheme/cond (else 3)))))

where ELSE is not renamed.

-- 
Martin

<Prev in Thread] Current Thread [Next in Thread>