[Larceny-users] [long] identifier bindings and visibility across phases
Marco Maggi
marco.maggi-ipsu at poste.it
Wed Oct 7 02:56:38 EDT 2009
"Andre van Tonder" wrote:
> On Tue, 6 Oct 2009, Andre van Tonder wrote:
>
> > WOPPA is not exported from library DEF, so any attempt
> > to refer to it from outside DEF should fail. The
> > behavior of Larceny and Ypsilon are correct, and that of
> > Ikarus and Mosh are incorrect.
>
> Reconsidering, I think this might be underspecified in
> R6RS, so both behaviours might be fine.
Last note before giving up; the following works for Ikarus,
Larceny, Mosh and Ypsilon:
(library (subsublib)
(export blue)
(import (rnrs))
(define (blue) 123))
(library (sublib)
(export h)
(import (rnrs) (for (subsublib) (meta -1)))
(define h
(make-eq-hashtable))
(hashtable-set! h 'b (syntax blue)))
(library (lib)
(export thing)
(import (rnrs) (for (sublib) expand))
(define-syntax thing
(lambda (stx)
(syntax-case stx ()
((_)
(with-syntax ((f (hashtable-ref h 'b #f)))
#'(f)))))))
(import (rnrs) (lib))
(write (thing))
so the fact that the identifier has to be imported in the
library defining the macro transformer is not the whole
story...
--
Marco Maggi
More information about the Larceny-users
mailing list