[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Implement `the-environment' and `local-eval' in evaluator
From: |
Andy Wingo |
Subject: |
Re: [PATCH] Implement `the-environment' and `local-eval' in evaluator |
Date: |
Sat, 07 Jan 2012 02:26:27 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) |
On Fri 16 Dec 2011 20:12, Mark H Weaver <address@hidden> 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/