Email list hosting service & mailing list manager

indirect-export in macro Andre van Tonder (01 Dec 2005 16:45 UTC)
Re: indirect-export in macro Matthew Flatt (01 Dec 2005 16:49 UTC)

Re: indirect-export in macro Matthew Flatt 01 Dec 2005 16:51 UTC

At Thu, 1 Dec 2005 11:45:19 -0500 (EST), Andre van Tonder wrote:
> Since identifiers introduced by an expansion are distinct
> (in the sense of bound-identifier=?) from library-toplevel
> identifiers, would the following work?
>
>   (library "let-div" "scheme://r6rs"
>     (define-syntax make-export
>        (syntax-rules ()
>          ((_)
>           (indirect-export (quotient+remainder)))))
>
>     (make-export)
>     (define (quotient+remainder n d) ....)

Yes, because the `make-export' expansion doesn't introduce a binding of
`quotient+remainder'; it merely refers to a binding of
`quotient+remainder' (as well as `indirect-export').

In other words, the relevant predicate is not `bound-identifier=?' but
`free-identifier=?'. [In PLT Scheme, it's `module-identifier=?', but I
expect this predicate to be renamed `free-identifier=?' in the future.]

Matthew