This is the mail archive of the guile@cygnus.com mailing list for the guile project.


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

define-module + let-syntax + load ?



>my conclusion is that this approach must have some fundamental flaw due
>to lack of understanding of fine-detail interaction between the (current)
>module system, loading and syntactic extension.  can anyone suggest a
>better approach?

At the moment, no.

The approach you're trying seems to assume that loaded code is
evaluated in the environment in which the call to LOAD appears, which
is not so.  Syntax isn't dynamically scoped (and it's hard to imagine
what life would be like if it were).

In the future, LOAD, like EVAL, should take an "environment" option;
the environment will be able to hold syntactic bindings, as well as
variable bindings.

For now, I think the top-level definitions are the only way to go.