[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: indirect-export in macro
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)))))
> (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.]