Thanks, Zbigniew. I indeed figured out the renaming of #!rest before Chicken sees it. But I didn't think of the hack and I'll give it a try soon. However, it is not a nice solution and my guess would be that the syntax-case egg should have a build in exception for the #!key and #!rest keywords, so that they will not be renamed. I have no clue how to do that at this moment though.
Cheers, Mark > 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, [EMAIL PROTECTED] <[EMAIL PROTECTED]> 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 mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/chicken-users
