This is the mail archive of the kawa@sources.redhat.com 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]

Re: forward reference to syntax


Doug Orleans <dougo@ccs.neu.edu> writes:

> Is there any chance of this being changed, i.e. forward references to
> syntax being treated the same as forward references to procedures?

It could be made to work in certain cases, for example when the macro
definition and the use are both in the same begin, or otherwise when
the compiler is compiling a whole file as a unit.  But your example
is not going to work, since the compiler needs the macro definition
when compiling foo (unless we compile procedure bodies lazily).

> Or is this disallowed by R5RS or something?

I'm fairly sure your program is not allowed by R5RS.

> If not, at least a more
> informative error message would be nice, if possible...

Yes, it would be nice ...  I have tended to conventrate on performance,
rather than good error checking/messages.  Adding a better error message
is doable but problematical, at least the way the code is currently
organized.  (It would be easy enough to at a try/catch in
Constraint.getProcedure, but what to do about it is a bit trickier,
as I don't want gnu.mapping to need to know about the class Macro.)
-- 
	--Per Bothner
per@bothner.com   http://www.bothner.com/~per/


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