William D Clinger <xxxxxx@ccs.neu.edu> schrieb am Do., 20. Juli 2017 um 03:37 Uhr:
The mystery may not be so mysterious after all.

Now it is a mystery to me why I got different results from Chibi and Sagittarius when I tried the example yesterday.

If Chibi and Sagittarius return ‘unmatched’, they probably do not rename aggressively enough.

I will investigate later; have to lecture now - two weeks of the semester still remain here.

(And will think about your reasoning in the other post; a simple fix would be to add an extra input element ":continuation" to expand-transformer and syntax-rules-aux so that ":continuation" is simply copied from the input, but I would like to understand your arguments thoroughly.)

Marc


Marc Nieper-Wißkirchen wrote:

> I tried the following code at the repl:

(define-syntax foo
  (syntax-rules ()
    ((foo bar x)
     (define-syntax bar
       (syntax-rules (x)
         ((bar c) 'matched)
         ((bar z) 'unmatched))))))

(foo bar c)
(bar q)

> Chez, Chibi, Racket (R6RS), Larceny (R7R6, version from yesterday) all
> evaluate the last expression to matched.

I should have tested that myself.  Chibi and Sagittarius are returning
`unmatched` for me:


% chibi-scheme -V
chibi-scheme 0.7.3 "nitrogen" (chibi r7rs ...)
% chibi-scheme
>
(define-syntax foo
  (syntax-rules ()
    ((foo bar x)
     (define-syntax bar
       (syntax-rules (x)
         ((bar c) 'matched)
         ((bar z) 'unmatched))))))
> (foo bar c)
> (bar q)
unmatched


% sagittarius --version
Sagittarius scheme shell, version 0.8.4 (x86_64-pc-linux)
% sagittarius -r7
sash[r7rs]>
(define-syntax foo
  (syntax-rules ()
    ((foo bar x)
     (define-syntax bar
       (syntax-rules (x)
         ((bar c) 'matched)
         ((bar z) 'unmatched))))))
#<unspecified>
sash[r7rs]> (foo bar c)
#<unspecified>
sash[r7rs]> (bar q)
unmatched


Kawa v2.4 also returns `unmatched`.  Petite Chez returns `matched`,
however.

Will
To unsubscribe from this list please go to http://www.simplelists.com/confirm.php?u=WayvK6iwmHINAznW2ePeHwbeWO2K4TOY