unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Skyler Ferris <skyvine@protonmail.com>
To: Mortimer Cladwell <mbcladwell@gmail.com>, guile-user@gnu.org
Subject: Re: can't export conditional variable set with 'cond'
Date: Wed, 24 Jan 2024 20:07:08 +0000	[thread overview]
Message-ID: <9acca80f-02fe-457a-bbad-46d884d34387@protonmail.com> (raw)
In-Reply-To: <CAOcxjM7hLZP7jhp+vHy9f+8Yo+UDS5chHyi5q-5OaEFCttxMtQ@mail.gmail.com>

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.





  parent reply	other threads:[~2024-01-24 20:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-23 13:37 can't export conditional variable set with 'cond' Mortimer Cladwell
2024-01-23 14:22 ` Damien Mattei
2024-01-24 20:07 ` Skyler Ferris [this message]
2024-02-01 12:06   ` Daniel Meißner
2024-02-01 14:53     ` M
2024-02-02  0:13     ` Skyler Ferris
2024-02-02  0:00 ` Skyler Ferris
2024-02-02  0:16   ` M
2024-02-02  0:25     ` Skyler Ferris
  -- strict thread matches above, loose matches on Subject: below --
2024-02-02  8:15 Mortimer Cladwell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9acca80f-02fe-457a-bbad-46d884d34387@protonmail.com \
    --to=skyvine@protonmail.com \
    --cc=guile-user@gnu.org \
    --cc=mbcladwell@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).