[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: Fri, 16 Dec 2011 17:01:17 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)

On Fri 16 Dec 2011 16:27, Mark H Weaver <address@hidden> writes:

> To my mind, top-level (module) variables are conceptually part of every
> lexical environment placed within that module.


> (define foo 'module-a)
> (define-syntax alt-environment
>   (syntax-rules ()
>     ((_) (the-environment))))

> and then evaluate the following within module B:

> (define foo 'module-b)
> (local-eval 'foo (alt-environment))

> What should the result be?

> My guess is that it should return 'module-a, because I think
> conceptually it should act as though the local-expression passed to
> `local-eval' were put in place of (the-environment), wherever that

Dunno, I could make an argument either way :)  Another question is how
would local environments relate to procedural macros.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]