[R6RS] libraries

Michael Sperber sperber
Sun Dec 11 10:53:55 EST 2005

dyb at cs.indiana.edu writes:

> So any identifier that leaks out of a module is fair game as long as
> the module itself exports some sort of assignment abstraction.  So,
> I presume, this is okay too:
>   (library S "scheme://r6rs"
>     (export A P! s)
>     (define s '())
>     (define-syntax A
>       (syntax-rules ()
>         [(_ p x) (p 's x)]))
>     (define-syntax P!
>       (syntax-rules ()
>         [(_ x y) (set! x (cons y s))])))
>   (library T "scheme://r6rs"
>     (import S)
>     (export P0!)
>     (define-syntax dequote-P!
>       (syntax-rules (quote)
>         [(_ (quote x) e) (P! x e)]))
>     (define (P0!) (A dequote-P! 0)))
> Again, both the set! and "reference" to s appear in the exporting module.


(There's some more general problem I have with the use of literals
here, but that doesn't have anything to do with the issue at hand.)

Cheers =8-} Mike
Friede, V?lkerverst?ndigung und ?berhaupt blabla

More information about the R6RS mailing list