I have written:
>   But, if it is an export problem, why the following works?
> BLUE is not exported by (sublib):
> 
> (library (sublib)
>   (export h)
>   (import (rnrs))
>   (define (blue)
>     456)
>   (define h
>     (make-eq-hashtable))
>   (hashtable-set! h 'b 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))

Okay,  that  is  a  stupid  example...  Anyway,  why  is  it
different from:

> (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))

? Creating a  syntax object is done exactly  to maintain the
lexical context informations, no?
-- 
Marco Maggi

_______________________________________________
Larceny-users mailing list
[email protected]
https://lists.ccs.neu.edu/bin/listinfo/larceny-users

Reply via email to