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

Re: [Scheme-reports] Are generated toplevel definitions secret?

On Sun, Apr 24, 2011 at 07:12:01PM +0200, Andy Wingo wrote:
> > If I change (define val init) to (define-for-syntax val init), the
> > generated "var" macro will pick up on it.
> I am suprised that you needed to do define-for-syntax here, as the
> *value* of the `val' bindings is not needed at expansion time; the
> expander must only note that there is such a binding.

Yeah, this is probably another bug :)
We've been cleaning up a lot of these kinds of bugs lately, but we're
not completely there yet :)

> This is what Andre was originally referring to, these "generated
> toplevel definitions".  This would be the correct expansion if "val"
> were bound in module A, and AIUI that has been chicken's argument, that
> it treats all identifiers as bound, and therefore this expansion is
> valid.

I think it may be possible to "fix" this.  I don't know, I'd have to dig
into it some more.

"The process of preparing programs for a digital computer
 is especially attractive, not only because it can be economically
 and scientifically rewarding, but also because it can be an aesthetic
 experience much like composing poetry or music."
							-- Donald Knuth

Scheme-reports mailing list