chicken-users
[Top][All Lists]
Advanced

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

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


From: F. Wittenberger
Subject: [Chicken-users] how to pass a certain environment to "eval"
Date: Fri, 10 Oct 2008 22:02:00 +0200

Am Freitag, den 10.10.2008, 21:48 +0200 schrieb Jörg F. Wittenberger:

> a) I could expand it at compile time into the unrolled for-each loop.
> That's quite a lot of code to be executed just once, isn't it?  (Not the
> typing, that's a macro's one time work.  The run time code is my concern
> here; maybe it's not that much of a damage - that's what I don't know.)

When I sent the last mail, this triggered right the next bug.

No: a) is not an option.

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.

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

Thanks a lot

/Jörg

> 
> b) Use whatever means to pass all the top level bindings named by list
> of symbols from the ???current???, "compile time" environment (where
> it's obviously bound already) -- and not the one "eval" sees (where it's
> unbound and would require yet another import) -- into my
> export-to-my-own-envt procedure (which currently happens to be a
> hash-table-set! with intentionally reversed arguments to better catch
> accidental misuse; but that might change any time).
> 
> * I can do (a), but I'm afraid that's stupid.  Is it?
> * If (b) is better (or simply easier, since (a) is to be some rewrite
> work in several files), how could I do it?




reply via email to

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