[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] syntax-case and #!rest, second attempt
From: |
Zbigniew |
Subject: |
Re: [Chicken-users] syntax-case and #!rest, second attempt |
Date: |
Sat, 25 Aug 2007 23:59:30 -0500 |
Mark,
The #!rest syntax is supported directly by Chicken and it appears the
extra indirection involved in syntax-case is causing the #!rest
keyword to be renamed before Chicken sees it (as you've probably
surmised). I do not know an easy way to fix this offhand, although
some syntax-case wizard might. However, you might wish to try the
horrible hack below, which may work in a limited fashion.
(define-syntax test
(lambda (x)
(syntax-case x (#!rest)
((_ (name arg ... #!rest r) e0 e1 ...)
(syntax
(define (name arg ... . r)
e0 e1 ...)))
((_ (name ...) body ...)
(syntax
(define (name ...)
body ...))))))
On 8/25/07, address@hidden <address@hidden> wrote:
> Folks,
>
> Since I'm still having problems with syntax-case and rest arguments, I
> have devised the following example which hopefully makes my problem clear:
>
> (define-syntax test
> (lambda (x)
> (syntax-case x ()
> ((_ (name ...) body ...)
> (syntax
> (define (name ...)
> body ...))))))
- [Chicken-users] syntax-case and #!rest, mark, 2007/08/21
- Re: [Chicken-users] syntax-case and #!rest, Kon Lovett, 2007/08/22
- Re: [Chicken-users] syntax-case and #!rest, mark, 2007/08/23
- [Chicken-users] syntax-case and #!rest, second attempt, mark, 2007/08/25
- Re: [Chicken-users] syntax-case and #!rest, second attempt,
Zbigniew <=
- Re: [Chicken-users] syntax-case and #!rest, second attempt, mark, 2007/08/26
- Re: [Chicken-users] syntax-case and #!rest, second attempt, Kon Lovett, 2007/08/26
- Re: [Chicken-users] syntax-case and #!rest, second attempt, mark, 2007/08/27