Re: [PATCH] Preserve keyword in 'syntax-rules' and 'define-syntax-rule'

2012-10-11 Thread Ludovic Courtès
Hi Alex, Alex Shinn alexsh...@gmail.com skribis: This is not a bug. R5RS states: The keyword at the beginning of the pattern in a syntax rule is not involved in the matching and is not considered a pattern variable or literal identifier. R6RS forbids _ as a literal. R7RS

Re: [PATCH] Preserve keyword in 'syntax-rules' and 'define-syntax-rule'

2012-10-10 Thread Mark H Weaver
Unfortunately, preserving the macro keyword breaks one of Oleg Kiselyov's macros, namely 'ppat' in system/base/pmatch.scm: --8---cut here---start-8--- (define-syntax ppat (syntax-rules (_ quote unquote) ((_ v _ kt kf) kt) ((_ v () kt kf) (if (null? v)

Re: [PATCH] Preserve keyword in 'syntax-rules' and 'define-syntax-rule'

2012-10-10 Thread Ludovic Courtès
Hi, Mark H Weaver m...@netris.org skribis: Unfortunately, preserving the macro keyword breaks one of Oleg Kiselyov's macros, namely 'ppat' in system/base/pmatch.scm: [...] Oleg's macro uses '_' in the keyword position of the pattern, even though '_' is in the literals list. Therefore, it

Re: [PATCH] Preserve keyword in 'syntax-rules' and 'define-syntax-rule'

2012-10-10 Thread Mark H Weaver
l...@gnu.org (Ludovic Courtès) writes: Mark H Weaver m...@netris.org skribis: Unfortunately, preserving the macro keyword breaks one of Oleg Kiselyov's macros, namely 'ppat' in system/base/pmatch.scm: [...] Oleg's macro uses '_' in the keyword position of the pattern, even though '_' is

Re: [PATCH] Preserve keyword in 'syntax-rules' and 'define-syntax-rule'

2012-10-10 Thread Alex Shinn
On Thu, Oct 11, 2012 at 5:41 AM, Ludovic Courtès l...@gnu.org wrote: Hi, Mark H Weaver m...@netris.org skribis: Unfortunately, preserving the macro keyword breaks one of Oleg Kiselyov's macros, namely 'ppat' in system/base/pmatch.scm: [...] Oleg's macro uses '_' in the keyword position

Re: [PATCH] Preserve keyword in 'syntax-rules' and 'define-syntax-rule'

2012-10-09 Thread Ludovic Courtès
Hi Mark! Makes sense to me, you can apply it. Thanks, Ludo’.

[PATCH] Preserve keyword in 'syntax-rules' and 'define-syntax-rule'

2012-10-08 Thread Mark H Weaver
Hello all, I'd like to be able to do things like this: --8---cut here---start-8--- (define-syntax alt-environment (syntax-rules () ((alt-environment) (the-environment alt-environment --8---cut