Derick Eddington
2009-09-16 07:56:46 UTC
IIUC, according to R6RS, ... is exported from (rnrs) with levels 0 and
1. This means if ... is used at level 2, then to get ... from (rnrs),
(rnrs) needs to be imported for (meta 1) so that ... is imported at
levels 1 and 2. If this is true, then I believe the below is a bug for
explicit-phasing systems. I tried it using
Larceny v0.97 "Funny in the Head" (Sep 16 2009 00:17:46, precise:Linux:unified)
larceny.heap, built on Wed Sep 16 00:19:27 PDT 2009
(import
(except (rnrs) syntax-rules ...)
(for (only (rnrs) syntax-rules) (meta 1))
(for (only (rnrs) ...) (meta 0 #;-11)))
(define-syntax S0
(let-syntax ((S1 (syntax-rules ()
((_ x ...)
(syntax-rules ()
((_)
(list x ...)))))))
(S1 1 2 3)))
(write (S0)) (newline)
$ larceny --r6rs --program ooo-level.sps
(1 2 3)
$
As you can see, using ... at level 2 worked, even though ... should have
been imported for only levels 0 and 1. It seems that ... is exported
with levels 0, 1, and 2, as the error message shows when instead
importing ... from (rnrs) at (meta -11).
1. This means if ... is used at level 2, then to get ... from (rnrs),
(rnrs) needs to be imported for (meta 1) so that ... is imported at
levels 1 and 2. If this is true, then I believe the below is a bug for
explicit-phasing systems. I tried it using
Larceny v0.97 "Funny in the Head" (Sep 16 2009 00:17:46, precise:Linux:unified)
larceny.heap, built on Wed Sep 16 00:19:27 PDT 2009
(import
(except (rnrs) syntax-rules ...)
(for (only (rnrs) syntax-rules) (meta 1))
(for (only (rnrs) ...) (meta 0 #;-11)))
(define-syntax S0
(let-syntax ((S1 (syntax-rules ()
((_ x ...)
(syntax-rules ()
((_)
(list x ...)))))))
(S1 1 2 3)))
(write (S0)) (newline)
$ larceny --r6rs --program ooo-level.sps
(1 2 3)
$
As you can see, using ... at level 2 worked, even though ... should have
been imported for only levels 0 and 1. It seems that ... is exported
with levels 0, 1, and 2, as the error message shows when instead
importing ... from (rnrs) at (meta -11).
--
: Derick
----------------------------------------------------------------
: Derick
----------------------------------------------------------------