mit-scheme-users
[Top][All Lists]
Advanced

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

Re: [MIT-Scheme-users] ref error


From: Matt Birkholz
Subject: Re: [MIT-Scheme-users] ref error
Date: Thu, 02 Nov 2017 11:27:29 -0700

On Thu, 2017-11-02 at 10:02 +0200, David Gray wrote:
> This could have been the case as I was messing around in the repl.
> However when I tried to find the simplest case to replicate
> the error I restarted scheme, did a load, then got the error. Then I
> restarted again, pasted the code from the file to *scheme*
> where everything was OK.

Looking at how scmutils is built, I find that scmutils/src/load-
real.scm ends with a GE expr, which changes your REPL's environment. 
Thus your subsequent use of REF works in that REPL.

When LOAD and REF exprs are in the same file, they are both evaluated
in the same environment (probably the user-initial-environment).  Thus
the REF expr is NOT evaluated in the user-generic-environment (where it
is actually defined).




reply via email to

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