[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: indirect-export in macro

This page is part of the web mail archives of SRFI 83 from before July 7th, 2015. The new archives for SRFI 83 contain all messages, not just those from before July 7th, 2015.



 
 > 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.]
 
 Ah thanks, but I just realized that the example does not conform to the
 BNF specification of the library syntax in the document.  So the 
 example should not even be possible.  Is this correct?
 
 Regards
 Andre