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: macros and compilation


Marco Vezzoli <marco.vezzoli@st.com> writes:

> Some other stuff about this...
> I tried to move the (module-export ) form at the end of the source file;
> both kinds of compilations were OK,

I looked a little at this.  There is definitely a Kawa bug, but it is
not a trivial fix.  A work-around is to put the module-export last,
ast you tried.

> #|kawa:1|# (require <macmod>)
> #|kawa:2|# (das-search 'test)
> gnu.mapping.UnboundSymbol: Unbound symbol %das-search
>         at gnu.mapping.Environment.getChecked(Compiled Code)
>         at kawa.standard.ScmEnv.getChecked(Compiled Code)
>         at gnu.expr.ReferenceExp.eval(Compiled Code)
>         at gnu.expr.ApplyExp.eval(Compiled Code)
>         at gnu.expr.ModuleExp.evalModule(Compiled Code)
>         at kawa.Shell.run(Compiled Code)
>         at kawa.Shell.run(Compiled Code)
>         at kawa.Shell.run(Compiled Code)
>         at kawa.repl.main(Compiled Code)
> 
> I don't know if this is the behaviour I should expect...
> I don't need to access %das-search directly but the macro does.

This is a bug in the "hygiene" processing of Kawa macros.  Again,
it doesn't look like it will be easy to fix.  As a work-around,
I'm afraid you'll have to also export %das-search.

At some point I need to carefully study the Dybvig's syntax-case
specfication and implementation, and then change Kawa to match.
-- 
	--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]