From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrew Tropin Newsgroups: gmane.lisp.guile.devel Subject: Define works different when Compile and Eval Date: Wed, 19 Jun 2024 13:04:44 +0400 Message-ID: <875xu5i9qr.fsf@trop.in> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14055"; mail-complaints-to="usenet@ciao.gmane.io" To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Wed Jun 19 11:05:38 2024 Return-path: Envelope-to: guile-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sJrG5-0003Ni-KJ for guile-devel@m.gmane-mx.org; Wed, 19 Jun 2024 11:05:37 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sJrFa-0000CR-93; Wed, 19 Jun 2024 05:05:06 -0400 Original-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 1sJrFY-0000C9-Lo for guile-devel@gnu.org; Wed, 19 Jun 2024 05:05:04 -0400 Original-Received: from out-186.mta0.migadu.com ([91.218.175.186]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sJrFV-0001h4-Iy for guile-devel@gnu.org; Wed, 19 Jun 2024 05:05:04 -0400 X-Envelope-To: guile-devel@gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=key1; t=1718787896; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=qpmavwyPAvrwMtsip+0UMvGaw7WIglRjGZdaubghFcE=; b=McWCSdlxHXG42ZV74QUwNfmPFLON81yTMSLNRrxIS9yTz+ozUXLCkexX909His0AUnXjfr lLyuQO0MqP2EcC5pq/Cv5omRj223myYZhp05yFRHcm+mdOvCk7l/azov8d0nI65XFvCcZS j6i9DwLajgpPh9tEXgUDNBkqMEmR54ytzIZu93V7I4OR2ZA09IDGV/5yKmGdtDwk32Oo9H Rrodx5RBUzYUYUIb5KjNfNFgwpcEWEu1t7zgnNQnk/kzFhNM+Z04t+vbdzSnirFjkGGiTi vMKkJ36abCJncS+crgrSoGi+aDRRHxbtXcaB3YcQdiRsOpUrJzYaCjUIhxXJRw== X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=91.218.175.186; envelope-from=andrew@trop.in; helo=out-186.mta0.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, 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-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.devel:22448 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Here is a snippet of code, which I expect to produce the same result with both eval and compile, but the results are different. When compile is used (define a a) sets a to #. Is it a bug? =2D-8<---------------cut here---------------start------------->8--- (define-module (2024-06-18-define-bug)) (use-modules (system base compile)) (define (peval e) (compile e #:to 'value #:env (resolve-module '(2024-06-18-define-bug)))) (define (test-eval teval) (teval '(define a 1)) (teval '(define a a)) (format #t "a value with ~a is ~a\n" teval (teval 'a))) (test-eval peval) (test-eval primitive-eval) (exit 0) ;; guile -l 2024-06-18-define-bug.scm # output is: ;; a value with # is # ;; a value with # is 1 =2D-8<---------------cut here---------------end--------------->8--- =2D-=20 Best regards, Andrew Tropin --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmZynywACgkQIgjSCVjB 3rCFMA/8CA90KzvuDnCKgNEYuR9r7SmUxAMkCcfi59lQywvqZh+rDedNz5IvlYNE 5HNcqB95ARAkuGU3+cTA+dV1XTU3fIA99TSSI8M+jd3W/9pTYClUKM9/a5PUFAIq VIU+3KEfiZfvNYhSpyMfdTod7DG5My+dNqFG/yvO51NXlM38AvUyPsiH1q4+TluY lrpMVQrLkPISzCSo3oLYJzPNdrFC0d1+v1gs0kyUSuivwtroIqSjkhtizc//AkYN 0WUF3HCUzjE30O8qZUT4GXeKg1b3uc8urENvLhDffcnjSAPAQW5zCi/jIT/MD98h r7q/0vRAJuAfEIO5JctUfsRa8OkHKTnzhK95TZZukfMUe9xUWwCynIsQU3bDO2zW UKYh/tXcltuGH4PxbhO72mZPYc1puDvOXoMUq+A96hM+F0Y2GAEJnIyZxR/FvPHy gQ0dlwLsklYdwpXJzZdOGjG3m9mamDms2jxR+cdDvjSQbGWDye8TBCsFTrLa2vSS QmwrEdSlMPuIg583pII9ZSd3VGV+AOB94a2FAYIdx8vCSltdiRZFljTjWKW9XoiC GFVkBMx9/AMJkk7qdfj3p4V1tSmlDMVFad1C+zNHL54Qc7LxlsqMCotb3g5qV57R RBH41ynwTWo7I33bGSw0hpqCohEzp/jeQecc6DaYfxLarVSzWIM= =fFjd -----END PGP SIGNATURE----- --=-=-=--