This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: compilation error when apply macro in the same module


Yaroslav Kavenchuk wrote:
2008/2/16, Per Bothner <per@bothner.com>:
Probably, but you don't give me a complete test-case to try - just
the macro definition, not the macro use.

Ok. Simple test.

Hm. It's not a trivial fix. The problem is that we also have to
handle forward references, which is why Kawa has two separate passes: One for reading and macro-expansion, and one for name-resolution and
actually generating "Expression" objects. (Then later there are
various optimizations passes before we actually do code generation.)


So if a function is defined in a module and then used later in the
same module, we've only done the first of these passes by the time
we actually try to use the macro.

A fix to this could be to do the second pass processing "on demand".
But that has some complications.  I think I need to understand what
other Scheme implementations do in this case.  I should also read up
on what R6RS requires, and re-read a paper from last year's ICFP that
touches on this.

So we don't forget about this bug, could you enter it, along with the
test-case into Kaw's BugZilla?
--
	--Per Bothner
per@bothner.com   http://per.bothner.com/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]