guile-user
[Top][All Lists]
Advanced

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

Re: can't export conditional variable set with 'cond'


From: Skyler Ferris
Subject: Re: can't export conditional variable set with 'cond'
Date: Wed, 24 Jan 2024 20:07:08 +0000

On 1/23/24 05:37, Mortimer Cladwell wrote:
> When I run the above I get as output:
>
> "varB post cond: B"
> "varC post if: C"
> "varA in main: A"
> "varB in main:"
> "varC in main: C"
>
> Why can I reset the variables with both 'cond' and 'if' in env.scm, but
> only the variable reset with 'if' is exported with the updated value?

I don't have a complete answer, but it looks like this has to do with 
compilation. If I run it like this:

$ export GUILE_LOAD_PATH=$pwd
$ guile main.scm

Then I see similar output, except that for me varC has also not been 
updated. I am on guile version 3.0.9.

However, if I first set GUILE_AUTO_COMPILE=0 (and delete the cached 
compiled modules) then the main module sees the updated values.

I'm not sure how imperative code in the top level of a module works when 
compiling. It seems like a grey area.





reply via email to

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