chicken-users
[Top][All Lists]
Advanced

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

[Chicken-users] Re: how to pass a certain environment to "eval"


From: felix winkelmann
Subject: [Chicken-users] Re: how to pass a certain environment to "eval"
Date: Sun, 12 Oct 2008 22:53:58 +0200

On Fri, Oct 10, 2008 at 10:02 PM, Jörg F. Wittenberger
<address@hidden> wrote:
>
> I need "eval" to see my imported modules from top level.  Right now -
> and with the srfi-35.scm from my last posting - condition-message? (for
> instance) is unbound in eval.  "import" will try somewhere to find a .so
> which I could use, but don not really want that for some policy reasons.

"import" will try to find an import library. If you compile your modules
with "-emit-import-library MODULE", then a "MODULE.import.scm"
will be generated that you can compile to a .so and which can then
be accessed via "import". Getting rid of this run-time dependency
would mean to statically link the import lib. An interesting option, that
I'll investigate.

>
> So how do I derive a new "eval", which evaluates in the environment I
> created using a mixture of "import" and "uses"?

Currently there is no clean way, but see the hack I talked about in the
previous mail. But I would not try to simply overwrite toplevel bindings
like "condition?". You'll confuse library code.


cheers,
felix




reply via email to

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