chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] Implementing a remote REPL, can't see definitions


From: Stephen Eilert
Subject: Re: [Chicken-users] Implementing a remote REPL, can't see definitions
Date: Wed, 26 May 2010 16:29:49 -0300

Took me a few days to figure out this one.

Turns out that my program had (declare (block)) somewhere in it.


-- Stephen

Sent from my Emacs


On Mon, May 24, 2010 at 1:37 AM, Nicolas Pelletier
<address@hidden> wrote:
> Hello,
>
> On Sun, May 23, 2010 at 5:12 AM, Stephen Eilert <address@hidden> wrote:
>>
>> However, I cannot evaluate any definitions from the rest of the
>> program. It seems that I can create new ones, though.
>
> Are you saying that the bindings established by the rest of the
> program are not seen by eval ? If so, are you aware of the following
> construct (taken from
> http://community.schemewiki.org/?scheme-faq-misc#sicp) ?
>
> ((eval `(begin (define ,name #f)
>                (lambda (val) (set! ,name val)))
>        (interaction-environment))
>  value)
>
> Piping the needed values through lambda as in the above will let you
> control which definitions can be used, and might be enough for what
> you are trying to achieve.
>
>> I am not passing any other arguments to eval, so I suppose it is using
>> (interaction-environment).
>
> Correct. This means that a new interaction environment will be
> generated each time eval is called.
>
> Hope this helps,
>
> --
> Nicolas
>
> _______________________________________________
> Chicken-users mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/chicken-users
>



reply via email to

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