[r6rs-discuss] [Formal] Replacing the import's "for" syntax with implicit phasing
On Fri, 2006-11-17 at 10:01 -0500, Abdulaziz Ghuloum wrote:
> On Nov 17, 2006, at 8:42 AM, Sam Tobin-Hochstadt wrote:
>
> > This is incorrect. Visiting F is necessary to determine what bindings
> > F
> > provides. For example, if F is:
>
> No. F is already expanded and compiled. I don't care about its source.
This is not what you said. To quote you slightly more extensively:
> Suppose the library F is defined as follows:
>
> (library F
> (export f)
> (import r6rs)
> (define f 12))
>
> Also, suppose G imports F because it needs it:
>
> (library G
> (export g)
> (import r6rs (for F expand))
> (let-syntax ([m (lambda (_) f)])
> (define g (m)))
> --other-stuff--)
>
> Expanding G causes
> F to be visited (not needed: doesn't use any of F's macros)
> F to be invoked (needed to evaluate F's f)
>
> Visiting G causes
> F to be visited (not needed: doesn't use any of F's macros)
> F to be invoked (not needed: doesn't use any of F's variables)
Here you claim that neither expanding nor visiting G requires F to be
visited (that's what "not needed" means). This claim is false, as I
demonstrated - both expanding and visiting G require knowing the
bindings provided by F, which requires expansion of F. Had F previously
been compiled (which you did not state), then that would not be
necessary. However, in your example, nothing has been compiled before
the expansion of G, so F must be expanded.
sam th
Received on Fri Nov 17 2006 - 12:18:35 UTC
This archive was generated by hypermail 2.3.0
: Wed Oct 23 2024 - 09:15:00 UTC