On Fri 16 Dec 2011 20:12, Mark H Weaver <[email protected]> writes:
> So, in cases where (the-environment) is found within a macro template,
> I guess I'm still undecided about whether the captured expander
> environment should be at the point of (the-environment), or whether it
> should be at the point of the initial macro use that led to that
> expansion.
Here's the thing, I think: FOO and (local-eval FOO (the-environment))
should be equivalent. These two are the same:
(library (a)
(export fetch-a)
(import (guile))
(define a 42)
(define-syntax fetch-a
(syntax-rules () ((_) a))))
(library (a)
(export fetch-a)
(import (guile))
(define a 42)
(define-syntax fetch-a
(syntax-rules () ((_) (local-eval 'a (the-environment))))))
So I think that the environment should be captured such that these
semantics are followed. I think that means the former, of your two
options.
Andy
--
http://wingolog.org/