From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 23 09:19:51 2024 Received: (at submit) by debbugs.gnu.org; 23 Jan 2024 14:19:51 +0000 Received: from localhost ([127.0.0.1]:42520 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rSHd1-0007vH-6k for submit@debbugs.gnu.org; Tue, 23 Jan 2024 09:19:51 -0500 Received: from lists.gnu.org ([2001:470:142::17]:60232) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rSHcy-0007v4-Uy for submit@debbugs.gnu.org; Tue, 23 Jan 2024 09:19:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rSHco-0007RT-UC for bug-guile@gnu.org; Tue, 23 Jan 2024 09:19:38 -0500 Received: from albert.telenet-ops.be ([2a02:1800:110:4::f00:1a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rSHcm-00083l-Ub for bug-guile@gnu.org; Tue, 23 Jan 2024 09:19:38 -0500 Received: from [IPv6:2a02:1808:82:1cbc:3d44:b8dc:e50:57f6] ([IPv6:2a02:1808:82:1cbc:3d44:b8dc:e50:57f6]) by albert.telenet-ops.be with bizsmtp id eEKW2B00D0r4tad06EKWS3; Tue, 23 Jan 2024 15:19:31 +0100 Message-ID: <20240123151931.eEKW2B00D0r4tad06EKWS3@albert.telenet-ops.be> MIME-Version: 1.0 To: Mortimer Cladwell , "bug-guile@gnu.org" From: M Subject: RE: can't export conditional variable set with 'cond') Date: Tue, 23 Jan 2024 15:19:30 +0100 Importance: normal X-Priority: 3 In-Reply-To: References: Content-Type: multipart/alternative; boundary="_488F17B0-E313-4F89-8A3A-4F7EBBEF66C7_" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=telenet.be; s=r24; t=1706019571; bh=sRzZCIBgzK5zF2xRqR66dsYh82j2vcV2wI7AEz3uOt0=; h=To:From:Subject:Date:In-Reply-To:References; b=ONW7RV6DuHiyDif8Fiq96GS6blSapKKGinhal6JVcFw//AZyF6PilLu8eEiX8luZL aL8fMI/AuB2DHqHztYx3/d8GI2aBEQUSDLCMpySbbTGWTCHGFySNNqGKVpGEZK4Fko L6BDqXQt96tv9Tn9SLLIeug8YgWOA3QltLcI7SbwO18uWRd80cuxW7ie1wDqHq1+Ew x8sLRuhbUKKGykhlbp/XhOqglP+J/81jUqObG5HtQeQUcq8i2o9MsMgxAkT8bW4tkI 1VQZILpe8cVS36YP8GvwDW50iHdMkDEaGTZO1f7fEm1vLOqpQZZ8UB0hIubZnz8l2n iBbv3yXHp2d+A== Received-SPF: pass client-ip=2a02:1800:110:4::f00:1a; envelope-from=maximedevos@telenet.be; helo=albert.telenet-ops.be X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --_488F17B0-E313-4F89-8A3A-4F7EBBEF66C7_ Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" >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? Because apparently that=E2=80=99s a bug in Guile, presumably in the impleme= ntation of inlining. I propose sending the mail to bug-guile@gnu.org. --_488F17B0-E313-4F89-8A3A-4F7EBBEF66C7_ Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset="utf-8"

>W= hy can I reset the variables with both 'cond' and 'if' in >env.scm, but<= /p>

>only the variable reset with 'if' is exported w= ith the updated >value?

 

Because apparently that=E2=80=99s a bug in Guile, presuma= bly in the implementation of inlining. I propose sending the mail to bug-guile@gnu.org.

 

= --_488F17B0-E313-4F89-8A3A-4F7EBBEF66C7_-- From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 23 09:23:31 2024 Received: (at 68673) by debbugs.gnu.org; 23 Jan 2024 14:23:31 +0000 Received: from localhost ([127.0.0.1]:42526 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rSHgY-00081l-PN for submit@debbugs.gnu.org; Tue, 23 Jan 2024 09:23:31 -0500 Received: from michel.telenet-ops.be ([2a02:1800:110:4::f00:18]:56096) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rSHgV-00081W-4R for 68673@debbugs.gnu.org; Tue, 23 Jan 2024 09:23:28 -0500 Received: from [IPv6:2a02:1808:82:1cbc:3d44:b8dc:e50:57f6] ([IPv6:2a02:1808:82:1cbc:3d44:b8dc:e50:57f6]) by michel.telenet-ops.be with bizsmtp id eEPE2B00U0r4tad06EPFuk; Tue, 23 Jan 2024 15:23:15 +0100 Message-ID: <20240123152315.eEPE2B00U0r4tad06EPFuk@michel.telenet-ops.be> MIME-Version: 1.0 To: "68673@debbugs.gnu.org" <68673@debbugs.gnu.org> From: M Subject: FW: can't export conditional variable set with 'cond' Date: Tue, 23 Jan 2024 15:23:15 +0100 Importance: normal X-Priority: 3 In-Reply-To: References: Content-Type: multipart/alternative; boundary="_86755A4C-A7A4-420F-9EB7-AE964E89BC3E_" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=telenet.be; s=r24; t=1706019795; bh=nhACm1N0A7p6Sy1DT5wVx4NJgkFMn5ekVa1+75JvJIY=; h=To:From:Subject:Date:In-Reply-To:References; b=DyyQsYBUacpQZ60988b7/ndF/GiReHYzgLnHMX93uW4gXzq0hHX3f46MdGGi1dZLO +94A4zfthZI+2DV5lpLcFanAOhJt+eUmzpYBFOs+DtYdCuAZpbm93NnVnwxbSIPuD4 oB33nUNF/AMwnHH5UATQ/W8rXJx1WVKVQbOTrN9iCOs96cAEUKV5rxg+K7hhvJ5Hy+ +A9KbVxQEXwOVm8c7T9ZplvOU3w0t2TFaU5NUS5eqdq3N3V/u+WUAV6aMp+Pn/tNj/ /F8Be9yX2Eo4uk9IFmPKy92ZJu341u3aGjH3BewN6uq0fMVAEuHLmAOTMg47lXXBnN YhpbpVcJ3AFTg== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 68673 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --_86755A4C-A7A4-420F-9EB7-AE964E89BC3E_ Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Let=E2=80=99s include a copy of the actual bug report: Hi, Suppose I have the following module "testexport" with the auxiliary module "env.scm", used to set global environment variables: -------------testexport.scm begin---------------------------------- (define-module (testexport) #:use-module (ice-9 pretty-print) #:use-module (env) ) (define (main) (pretty-print (string-append "varA in main: " varA)) (pretty-print (string-append "varB in main: " varB)) (pretty-print (string-append "varC in main: " varC)) ) (main) -------------testexport.scm end---------------------------------- -------------env.scm begin---------------------------------- (define-module (env) #:use-module (ice-9 pretty-print) #:export(varA varB varC)) (define varA "A") (define varB "") (define varC "") (define testval "x") (cond ((string=3D testval "x") (set! varB "B")) ((string=3D testval "y") (set! varB "error")) ((string=3D testval "z") (set! varB "null")) ) (pretty-print (string-append "varB post cond: " varB)) (if (string=3D testval "x") (set! varC "C")) (pretty-print (string-append "varC post if: " varC)) -------------env.scm end---------------------------------- 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? Thanks Mortimer --_86755A4C-A7A4-420F-9EB7-AE964E89BC3E_ Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset="utf-8"

Let=E2=80=99s include a copy of the actual bug report:

 

 

Hi,

 

Suppose I have the following module "teste= xport" with the auxiliary module

"env.scm= ", used to set global environment variables:

<= o:p> 

-------------testexport.scm begin-= ---------------------------------

(define-module (t= estexport)

=C2=A0 #:use-module (ice-9 pretty-print)=

=C2=A0 #:use-module (env)

= =C2=A0 )

 

= (define (main)

=C2=A0 (pretty-print (string-append= =C2=A0 "varA in main: " varA))

=C2=A0 (pr= etty-print (string-append=C2=A0 "varB in main: " varB))

=C2=A0 (pretty-print (string-append=C2=A0 "varC in main= : " varC))

=C2=A0 )

 

(main)

----= ---------testexport.scm end----------------------------------

 

-------------env.scm= begin----------------------------------

(define-mo= dule (env)

=C2=A0 #:use-module (ice-9 pretty-print)=

=C2=A0 #:export(varA varB varC))

 

(define varA "A"= )

(define varB "")

(define varC "")

(define testval "= x")

 

= (cond

((string=3D testval "x") (set! var= B "B"))

((string=3D testval "y"= ;) (set! varB "error"))

((string=3D test= val "z") (set! varB "null"))

)=

(pretty-print (string-append "varB post cond:= " varB))

 

(if (string=3D testval "x")=C2=A0 (set! varC "C")= )

(pretty-print (string-append "varC post if: = " varC))

-------------env.scm end-------------= ---------------------

 

When I run the above I get as output:

=  

"varB post cond: B"

=

"varC post if: C"

&q= uot;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?

Thanks

Mortimer

<= o:p> 

= --_86755A4C-A7A4-420F-9EB7-AE964E89BC3E_--