[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
syntax-rules question...
From: |
Rob Browning |
Subject: |
syntax-rules question... |
Date: |
25 Apr 2001 15:35:29 -0500 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 |
While working on a srfi-11 implementation for guile, I ran in to a
problem which I asked about on guile-devel, but then realized might be
more appropriate here.
I had presumed that you could use letrec-syntax to define local
transformers that you could then use as helpers in the body of a
define-syntax transformer, but that doesn't seem to work. I wanted to
see if this was a bug or my misunderstanding. For example:
(use-modules (ice-9 syncase))
(define-syntax foo
(letrec-syntax ((xxx (syntax-rules () ((xxx bar) bar)))
(yyy (syntax-rules () ((yyy bar) (xxx bar)))))
(syntax-rules ()
((foo a b)
(+ (xxx a)
(yyy b))))))
guile> (foo 1 2)
ERROR: reference to identifier outside its scope xxx
ABORT: (misc-error)
guile>
Thanks
--
Rob Browning <address@hidden> PGP=E80E0D04F521A094 532B97F5D64E3930
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- syntax-rules question...,
Rob Browning <=