[Larceny-users] [long] identifier bindings and visibility across phases

Andre van Tonder andre at het.brown.edu
Tue Oct 6 19:27:27 EDT 2009


On Tue, 6 Oct 2009, Marco Maggi wrote:

> The following works with Ikarus, Mosh and Ypsilon;
> it fails only on Larceny:
>
> (library (sublib)
>  (export h)
>  (import (rnrs))
>  (define (blue)
>    456)
>  (define h
>    (make-eq-hashtable))
>  (hashtable-set! h 'b (syntax blue)))
>
> (library (lib)
>  (export thing)
>  (import (rnrs) (for (sublib) expand run))
>  (define-syntax thing
>    (lambda (stx)
>      (syntax-case stx ()
> 	((_)
> 	 (with-syntax ((f (hashtable-ref h 'b #f)))
> 	   #'(f)))))))
>
> ;;; the program
> (import (rnrs) (lib))
> (write (thing))

This looks like the same issue as previously.
The identifier BLUE is never exported from SUBLIB,
and so should not be available outside SUBLIB.

The fact that it works with other implementations
are likely an accident of their specific
implementation technique.







More information about the Larceny-users mailing list