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 of the pattern, even >> though '_' is in the literals list. Therefore, it fails to match >> because 'ppat' does not match that literal. > > I would call it a bug in ‘ppat’. However, the real question is how > frequent that “bug” is. If people have come to rely on the current > behavior, then it may be more reasonable to stick to it.
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 retains the R5RS ignoring of the initial keyword, adds _ as a wildcard, but allows it to be used as a literal. So this code would only break in R6RS. -- Alex