chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] unbound variable: export


From: felix winkelmann
Subject: Re: [Chicken-users] unbound variable: export
Date: Mon, 23 Oct 2006 23:06:25 +0200

On 10/23/06, Andreas Zwinkau <address@hidden> wrote:
On Mon, 23 Oct 2006 08:20:51 +0200
"felix winkelmann" <address@hidden> wrote:
> Can you provide the exact compilation instructions you
> used to build cackle-base.so?
Just "csc -s cackle-base.scm".

I uploaded the relevant files to http://beza1e1.tuxen.de/files/cackle/

Thanks - I could reproduce the problem.

This is caused by several things working in conjunction here:
syntax-case expands each toplevel-expression completely before it is passed to
the evaluator/compiler. The "include" forms in cackle-base.scm are toplevel-
expressions and when they include the code of the other files, the
"(use syntax-case)"
in cackle-dispatch.scm will replace the (toplevel-) macro-expander by a new
one, but that will only be in effect when the next toplevel expression is
expanded. The current one is still expanded by the low-level/define-macro
expander, which handles "declare" differently than syntax-case.

A solution is to put the "(use syntax-case)" into cackle-base.scm (for example
right at the start). It also emphasizes that all included files use the same
language (i.e. chicken + syntax-case).


cheers,
felix

--
http://galinha.ucpel.tche.br:8081/blog/blog.ssp




reply via email to

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