From unknown Fri Aug 15 19:32:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#52218: Unable to define more than one R7RS library per file Resent-From: Sam Lee Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Wed, 01 Dec 2021 08:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 52218 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: 52218@debbugs.gnu.org X-Debbugs-Original-To: bug-guile@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16383489421022 (code B ref -1); Wed, 01 Dec 2021 08:56:01 +0000 Received: (at submit) by debbugs.gnu.org; 1 Dec 2021 08:55:42 +0000 Received: from localhost ([127.0.0.1]:43198 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1msLOv-0000GP-Ti for submit@debbugs.gnu.org; Wed, 01 Dec 2021 03:55:42 -0500 Received: from lists.gnu.org ([209.51.188.17]:44068) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1msKJh-000709-Ca for submit@debbugs.gnu.org; Wed, 01 Dec 2021 02:46:13 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38892) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msKJe-0000ky-RH for bug-guile@gnu.org; Wed, 01 Dec 2021 02:46:13 -0500 Received: from sonic303-1.consmr.mail.bf2.yahoo.com ([74.6.131.40]:33375) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1msKJW-0003wf-9A for bug-guile@gnu.org; Wed, 01 Dec 2021 02:46:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1638344760; bh=O4MIiFflisP04hdtZOeiTGzNTKRriT4NfZoA0zc18zI=; h=Date:From:To:Subject:References:From:Subject:Reply-To; b=OmENhbO+60Y/savbd43qFaLgXFFgqUhJLMHqiB9bhnfToDH0zut88l7HH7/+m2R6aHd2ZCtewCV6tJDgNv0hMEh5US8lAyXSFxUSPvjqyWvmzXE0UL96I9OFJm1PCSTwBUGlUf3X0wuotzXwvZGQ/DMqhJPDv9COUrAFRdvdbP9pNOteWU/d7dfAYC0vZ7UlRZiBRXexGFL7CM3zhnSvql7NEBDoXwH7C37xiQoOKbSJYm5oz94dsUkZXE8mwemDNeuagCTNpnwkfJv613sx/Vp9zIwMxncWS8jDFal1uWnlaFiKg6l9icFYymGr6Ix6TMeBvpsxKeOcMXGFg5Dnwg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1638344760; bh=y/+6h4Gbx7m19TfHpol/Y+Ny9L5vmQUhrrn+XTnOeNt=; h=X-Sonic-MF:Date:From:To:Subject:From:Subject; b=To/qmCgZr89h+Wn1L9k1fu1KKM17H1VkzWVU0xZMmivq8AW4v0Pqeg43HHSTvm3sHWZSQb10/TP4vojmjWPghvFqg3/GNo8e0Yc+ofxy5k1IVxkCORdHPmxJ0/eehQGvfpiMQ2ToxL4iY1HzJ9RW38r5th3Q6sayBRG9mrtaqI1eIuXZl++EoQ1AtOHg/jC8GsVT38fya3v2pcWWgyvlSmlcMERPAy4RqfnJuDD0ODKB3h3tL/DkOQ8O8qeG9eKOZlp/X1pOM4sy6Xkxd5bX8BrDz25w8ijBU6oRNN5QiGig3JpLBfLrcUmTp1ubMd4hvEehXnKpnC6qJbowPMRdYw== X-YMail-OSG: y_wey14VM1lQeTCFRG6u_85OHq5MQrTTNmIe5fzbXT7UeyKM.0oj1fcBythC4cH 8yEgmWizVvp0209HKOWBH03I6sigxSkJSd2HURYS9QOakItr4ujrhQDnO440jx4gLuKDJs1PL03R 6mrZnNS8AxN7RFexQgZtHWmJQcgD8vo7Ay.RoLWoG3zW823ZYnc3Tr2eTs2l9sG3jvnwkcO8VELs w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BR2ENn4ddSsi90W7f4IAXuWwJ3pGyakPaIhneUdgasDOgC3. nplnZVOGdj6_fc43ixeWtkUtNV4tEjqTazD9mUwDgQ1tXZVLOJlW.C_tcwmy0tw9Z7l5Fruat9ai AO8oLVqIJ9CoHsLbSqW.jOOCC2kc_eYpkPoCp7tAufroIe87f8l5p2O_hhdrvo6_OSYmxNsPamdU C5V83x6TvOJFtEWuHVDr5O6Pq4uOQsvs24eBljhpuBSr.zRlVsC5LByj_8OPvPV1us7WAFglnWuL uMf6iZZMW9NyuJhni.UfiCtk1L1rtYy9Dtrq1ZY2wOVlgG20V32i79uWKGTM3LPRvIJVvQZstYmP d4cC7TWny2AlJIGi8grJQr_yXqXqRWUxSaMrvG9wDl4z8uOhnRCgcG67EeYxtOzZoGuWSMFR13Hw vuNOeCueLzl7Qj_hZ9mv6gcXS_8Mdviu7cVoh7CVIItEsgpKXLXBpb1Aq6UkxoRqp0SSlI8_h9bG DNHAatlLXqjCt1LpuCEp5WzA7TbhYcjxAtRl9RcVkoRK5ogZ7r0p9Vf6kUUTpDRYivpC1yWI1lEO D1gbi4YaAp02DxQ8pysQFBUo6638O4wcNZ6m3fJC08Xd0Ikp4ldsGjJNH4YSS.XANv8.yPInHYB4 f.gR_6v1yBHToIhmXeC0F4S78sOF2Qd3Y.mHza6YGfqa86grHusz_7DNmAN1vRgTDwYgVUBPHl4c SUWEy_v9fQBjbSTO5hNXGLtemv7kTh1TTUFP.QW93R3xBmjWjbSoUkMaaro6A54WRNp1d_oq4Y9_ X6AvVneoj8uR5kjRoEz2DkgEIu9zmyjHChaUhVjcVpDiFWR8N5wKkTFEkX2lqL_wG5YddwF6K_nX o X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic303.consmr.mail.bf2.yahoo.com with HTTP; Wed, 1 Dec 2021 07:46:00 +0000 Received: by kubenode509.mail-prod1.omega.sg3.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID a33c6d8c64ab57ae21d9901cfc6b8edd; Wed, 01 Dec 2021 07:45:57 +0000 (UTC) Date: Wed, 1 Dec 2021 07:45:53 +0000 From: Sam Lee Message-ID: <20211201074553.bzuoffwpaxw3da44@localhost> Mail-Followup-To: bug-guile@gnu.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline References: <20211201074553.bzuoffwpaxw3da44.ref@localhost> X-Mailer: WebService/1.1.19306 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Content-Length: 1534 Received-SPF: pass client-ip=74.6.131.40; envelope-from=samlee746@yahoo.com; helo=sonic303-1.consmr.mail.bf2.yahoo.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -0.4 (/) X-Mailman-Approved-At: Wed, 01 Dec 2021 03:55:40 -0500 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.4 (-) Guile is unable to handle more than one define-library per file. For example, this is "mylibs.sld", which contains two define-library: (define-library (example mylib) (import (scheme base)) (export f) (begin (define (f x) (+ x 1)))) (define-library (example main) (import (scheme base) (scheme write) (example mylib)) (export main) (begin (define (main) (display "The answer is: ") (display (f 1)) (newline)))) When loading this file into Guile using "guile -l mylibs.sld", or by using (load "mylibs.sld"), Guile will show this error: ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0 ;;; or pass the --no-auto-compile argument to disable. ;;; compiling /home/user/mylibs.sld ;;; WARNING: compilation of /home/user/mylibs.sld failed: ;;; Syntax error: ;;; unknown location: definition in expression context, where definitions are not allowed, in form (define (main) (display "The answer is: ") (display (f 1)) (newline)) ice-9/psyntax.scm:2794:12: In procedure syntax-violation: Syntax error: /home/user/mylibs.sld:14:4: definition in expression context, where definitions are not allowed, in form (define (main) (display "The answer is: ") (display (f 1)) (newline)) The error is always caused by the second define-library. Apparently, Guile no longer understands that define-library is a special form by the time the second define-library is evaluated. Is it not possible to define two R7RS libraries in the same file? Guile version: 3.0.7 From unknown Fri Aug 15 19:32:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#52218: Unable to define more than one R7RS library per file Resent-From: Linus =?UTF-8?Q?Bj=C3=B6rnstam?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Wed, 01 Dec 2021 10:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52218 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: "Sam Lee" , 52218@debbugs.gnu.org Received: via spool by 52218-submit@debbugs.gnu.org id=B52218.16383528777137 (code B ref 52218); Wed, 01 Dec 2021 10:02:01 +0000 Received: (at 52218) by debbugs.gnu.org; 1 Dec 2021 10:01:17 +0000 Received: from localhost ([127.0.0.1]:43241 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1msMQP-0001r3-04 for submit@debbugs.gnu.org; Wed, 01 Dec 2021 05:01:17 -0500 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:45531) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1msMQM-0001qn-Fw for 52218@debbugs.gnu.org; Wed, 01 Dec 2021 05:01:15 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id C64C65C01C5; Wed, 1 Dec 2021 05:01:07 -0500 (EST) Received: from imap51 ([10.202.2.101]) by compute6.internal (MEProxy); Wed, 01 Dec 2021 05:01:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=veryfast.biz; h= mime-version:message-id:in-reply-to:references:date:from:to :subject:content-type:content-transfer-encoding; s=fm1; bh=inQe8 2KhOQ79jlkP1JU7xqGCp5l5izw4EhhQkpckjkk=; b=BXAUorrSssRJTBlket/yF mMtMuEzMUJIXSARKpnSSVcMqjzmzsBFyIrHmC1/NXIfd57eQ8VeX3kdW1UZ7Og/9 oyuNWwagDkLzJYNLSF8eY1wSoek5REe8kp9ug7b3yPKaXDxyf/uereRKOPoQxs7Q ZjaOT2/H94QtXSMZHaGeoct/wDWCvQVTXLJSkVhc91ErKDog57hUlZPXNl5IJMOn fu99Lnv+h2yNxVVAxhPYG6S4hMeyxHQ9QfO+BeaLtRvRimltnhP7rAFT8LXQTXXg ZnRpYBf2GHf/SKmc9QUon0sP2EpHDbCMnoDWgbZXKIB0S6Tnh8xQOExJO+8CWmke A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=inQe82KhOQ79jlkP1JU7xqGCp5l5izw4EhhQkpckj kk=; b=LAm1goJ89uyxHCQNCO5l0PACCWMM8v8lNkHS8izpQ0Oex5AoGN4NlDMZ/ uxz1BFKrb9DB3GbBN3+LpIZgmgnHVh34RSopHFrj1rSegnzfCJlYcLIEOrnacyVw 2UDHfyiGFjhwupWl5TMD0Zr1Io/IT6PIgmrgMXHLmPijr8uTgLPRg7NtqaMHPSXw DbpA+HIXqC6JdJBfNxrX2QV0jOijNahK5hn9nP6NcX7kvpMptJHc+43XJxJzx9Bv ltCPkSztpnG9MdUp3P2MX1sXVfCtR3BEUBQpmBfLFYmG/+fV8H/mtw+XYh27LqS9 4/JdMDG2d2r7emRsv7HlxhMmrEwsQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrieefgddtlecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvufgtgfesthhqredtreerjeenucfhrhhomhepnfhinhhu shgpuehjnphrnhhsthgrmhcuoehlihhnuhhsrdgsjhhorhhnshhtrghmsehvvghrhihfrg hsthdrsghiiieqnecuggftrfgrthhtvghrnheptedvueetheeukeethfduvdejleetffeu vddvueduieeuvdettdeuheehvdejieffnecuvehluhhsthgvrhfuihiivgeptdenucfrrg hrrghmpehmrghilhhfrhhomheplhhinhhushdrsghjohhrnhhsthgrmhesvhgvrhihfhgr shhtrdgsihii X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 5F03F1BC0061; Wed, 1 Dec 2021 05:01:07 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-4458-g51a91c06b2-fm-20211130.004-g51a91c06 Mime-Version: 1.0 Message-Id: In-Reply-To: <20211201074553.bzuoffwpaxw3da44@localhost> References: <20211201074553.bzuoffwpaxw3da44.ref@localhost> <20211201074553.bzuoffwpaxw3da44@localhost> Date: Wed, 01 Dec 2021 11:00:46 +0100 From: Linus =?UTF-8?Q?Bj=C3=B6rnstam?= Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) 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 (-) Hi Sam! I am not a maintainer , nor a very proficient guile hacker, but I do hav= e some input. This is in line with the limitations of guile's R6RS implementation. I t= hink this is a long standing, low priority bug. It has to do with the ex= pansion of library (or define-library in this case) not properly resetti= ng the current module.=20 In the manual there is a section called "R6RS incompatibilities" that me= ntions this. Maybe an "R7RS incompatibilities" should be added. Best regards Linus Bj=C3=B6rnstam On Wed, 1 Dec 2021, at 08:45, Sam Lee via Bug reports for GUILE, GNU's U= biquitous Extension Language wrote: > Guile is unable to handle more than one define-library per file. For > example, this is "mylibs.sld", which contains two define-library: > > (define-library (example mylib) > (import (scheme base)) > (export f) > (begin > (define (f x) > (+ x 1)))) > > (define-library (example main) > (import (scheme base) > (scheme write) > (example mylib)) > (export main) > (begin > (define (main) > (display "The answer is: ") > (display (f 1)) > (newline)))) > > > When loading this file into Guile using "guile -l mylibs.sld", or by > using (load "mylibs.sld"), Guile will show this error: > > ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=3D0 > ;;; or pass the --no-auto-compile argument to disable. > ;;; compiling /home/user/mylibs.sld > ;;; WARNING: compilation of /home/user/mylibs.sld failed: > ;;; Syntax error: > ;;; unknown location: definition in expression context, where=20 > definitions are not allowed, in form (define (main) (display "The=20 > answer is: ") (display (f 1)) (newline)) > ice-9/psyntax.scm:2794:12: In procedure syntax-violation: > Syntax error: > /home/user/mylibs.sld:14:4: definition in expression context, where=20 > definitions are not allowed, in form (define (main) (display "The=20 > answer is: ") (display (f 1)) (newline)) > > > The error is always caused by the second define-library. Apparently, > Guile no longer understands that define-library is a special form by t= he > time the second define-library is evaluated. Is it not possible to > define two R7RS libraries in the same file? > > Guile version: 3.0.7 From unknown Fri Aug 15 19:32:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#52218: Unable to define more than one R7RS library per file Resent-From: Sam Lee Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Thu, 02 Dec 2021 03:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52218 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: Linus =?UTF-8?Q?Bj=C3=B6rnstam?= Cc: 52218@debbugs.gnu.org Received: via spool by 52218-submit@debbugs.gnu.org id=B52218.163841599014327 (code B ref 52218); Thu, 02 Dec 2021 03:34:01 +0000 Received: (at 52218) by debbugs.gnu.org; 2 Dec 2021 03:33:10 +0000 Received: from localhost ([127.0.0.1]:46220 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mscqL-0003j0-Hv for submit@debbugs.gnu.org; Wed, 01 Dec 2021 22:33:10 -0500 Received: from sonic304-10.consmr.mail.bf2.yahoo.com ([74.6.128.33]:38336) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mscGE-0002iJ-DD for 52218@debbugs.gnu.org; Wed, 01 Dec 2021 21:55:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1638413744; bh=EHhDSi3cgDu18i0d8ZnmTaMEbwcBVRwBQqiSLaBXV6g=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject:Reply-To; b=GBBbCITiyeeeGSBOAWWidSmroXKmWY9AJCFwZoDMJKwW2eaJJhsfwQ3xRJ5BxEECtmLp+TNid+Gv4fhDPCXUKELoQxoyBvEO3+H21WtHM9BrVmsD9CSE1U34EHWfC9gPiteoD/gK0/i0uQcXFnI3JEmVvPwUbHH5zhVjkK6s3mLmx+j2IewT/8+TSLjYehuZ3QtMweK/3jhZUpttt13eiYOpnp1XGO4Rq/iQqCHgXRCGq5ad/ojFdg51dmPh12/xt1u7vpmNgg/wn+bVbLlF3/nmoVILULM6uciPOKIdiuq3wQVzVcqLq1K2vK/sHG8Ckx/APIAMa//nQNkIS36Yow== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1638413744; bh=mgxlSlzJnK5smZoeAH1i8ZHlATFplOgi6rnW446cLUE=; h=X-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f8BM6pO8mB4Iiw.pHOLz1W8CIp3pTW3p_.cxnX0q3DiYU1 1w3ZC4.Ni17edYEqBy6BJ9Lz86hMDDY2FNVJcSdWJldwkn4NU0IPTLKZpwZVjkz6y1L8XfdWIwi1 Tnddwel3Zm9heDZMpImEBRQ.qu72.1ISTz03YnIMhhyVuG7_izc_sF4._zfyfL5w0cltbxnOLmdF 3AgoZX5dxuUW8MPGfq6jTuG481TxTdSN2xmDdPCx8x6ogdp79Wo5IfYrHVgJ6mrziDYHWf7tXy3e NrMePaKLHyAW3vWCg2UXDJAXQkMbqt8UnvxfGHb1IoFmwM8x_C7JRJI5mqhpHP79H9O7f9anBlad RFbALIGcF8DE1o41HUroxkYbbq2ghbKuyeXuMYT8EF7kFbDDhESfX3h.KuEBXLOocHG26Ct6EUmF AsNMdBLeDDNOX863pf7gwBw-- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.bf2.yahoo.com with HTTP; Thu, 2 Dec 2021 02:55:44 +0000 Received: by kubenode519.mail-prod1.omega.sg3.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID e874e1ba0f56eff5abf14ef822312932; Thu, 02 Dec 2021 02:55:37 +0000 (UTC) Date: Thu, 2 Dec 2021 02:55:33 +0000 From: Sam Lee Message-ID: <20211202025533.as5notbwgncsyb2v@localhost> References: <20211201074553.bzuoffwpaxw3da44.ref@localhost> <20211201074553.bzuoffwpaxw3da44@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Mailer: WebService/1.1.19306 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Content-Length: 970 X-Spam-Score: 0.2 (/) X-Mailman-Approved-At: Wed, 01 Dec 2021 22:33:08 -0500 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.8 (/) On 2021-12-01 11:00 +0100, Linus Björnstam wrote: > This is in line with the limitations of guile's R6RS implementation. I > think this is a long standing, low priority bug. It has to do with the > expansion of library (or define-library in this case) not properly > resetting the current module. > > In the manual there is a section called "R6RS incompatibilities" that > mentions this. Maybe an "R7RS incompatibilities" should be added. Hi Linus, There already exist a page in the manual about "Incompatibilities with the R7RS" [1]. Perhaps a paragraph similar to that found in the R6RS incompatibilities page should be added to the R7RS incompatibilities page. Something like this: "Multiple @code{define-library} forms in one file are not yet supported. This is because the expansion of @code{define-library} sets the current module, but does not restore it. This is a bug." [1]: https://www.gnu.org/software/guile/manual/html_node/R7RS-Incompatibilities.html From unknown Fri Aug 15 19:32:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#52218: Unable to define more than one R7RS library per file Resent-From: Linus =?UTF-8?Q?Bj=C3=B6rnstam?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Fri, 03 Dec 2021 14:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52218 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: "Sam Lee" Cc: 52218@debbugs.gnu.org Received: via spool by 52218-submit@debbugs.gnu.org id=B52218.163854126816935 (code B ref 52218); Fri, 03 Dec 2021 14:22:02 +0000 Received: (at 52218) by debbugs.gnu.org; 3 Dec 2021 14:21:08 +0000 Received: from localhost ([127.0.0.1]:50328 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mt9Qx-0004P5-Nv for submit@debbugs.gnu.org; Fri, 03 Dec 2021 09:21:07 -0500 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:41403) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mt9Qt-0004OA-U3 for 52218@debbugs.gnu.org; Fri, 03 Dec 2021 09:21:06 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id C00A03201C62; Fri, 3 Dec 2021 09:20:57 -0500 (EST) Received: from imap51 ([10.202.2.101]) by compute6.internal (MEProxy); Fri, 03 Dec 2021 09:20:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=veryfast.biz; h= mime-version:message-id:in-reply-to:references:date:from:to:cc :subject:content-type:content-transfer-encoding; s=fm1; bh=37ujE F2Ti86aXXKTyru00w4FVShHmnOkY4BHNdtDQj0=; b=ZzZjrzwmvdVTjnBEYDODO 508IA0r5lSZQEq2p2gAcr1qdNefjO6DxCNtlHyIAqujiLno9Dx4jdc3sJMlDs7x4 fEdl0ggPzdkvR/nVcavXuPsX+0huDk7ByYieTY5+D9+nNhZ7KF0u2AlxwVoTSFUG u3lM1D1Gkq8QPY3ap5/SZ0yNiIQvVJN46NvZb/mI5dk2Cci0FQ6nALOoQwY2i5L3 5BcnhHtjZyJgQPDUtbiERuTVmoEZ7zhZCU17uL5kztur3OY+W5+M/9lTJp/3WruH cYo5BoTb2KfU0tcDFQdIiEParNQwJ2DvRLPwAmxLLppTHHMrvsFuMlWx7NyB6Vpd Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=37ujEF2Ti86aXXKTyru00w4FVShHmnOkY4BHNdtDQ j0=; b=fiilDNX14WwMg9rFeWfhuz6AIaL0QZPUx2HH4RQRK7UbasfUmnnFJHiPR 3Kdg/UIJymG96jltX8hhhggJ4bpvatM27zEgoj5JhVDOPWECj5mlRDm501XwDU28 pJvA+P3boXTi2hH1qSFfptLA3fgGMmG8iVlfGQVVRITrGGuiVa/VXtAGEH4FPhrj ozVEZQgqkkDg7tN+7ki/wBmceu5ydej6vY44wBbae34E9xR/vDhZ1l6ifRmmolYU JhRLvUKmms9/x6bk8qvWHcBXKXKcYof7a6fdb7HjBTc2TNz12xUzhP/EwoN8rNgj 48sh4DlTSJP1DH6UQKWgE/xt6Ci+A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrieejgdeiiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvufgtgfesthhqredtreerjeenucfhrhhomhepnfhinhhu shgpuehjnphrnhhsthgrmhcuoehlihhnuhhsrdgsjhhorhhnshhtrghmsehvvghrhihfrg hsthdrsghiiieqnecuggftrfgrthhtvghrnhepteefjeekhfelteekhfffkeevueelfeff gfffleeffffhjeeuheeugfdvgefhleeunecuffhomhgrihhnpehgnhhurdhorhhgnecuve hluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheplhhinhhushdr sghjohhrnhhsthgrmhesvhgvrhihfhgrshhtrdgsihii X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id EB3541BC0064; Fri, 3 Dec 2021 09:20:56 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-4458-g51a91c06b2-fm-20211130.004-g51a91c06 Mime-Version: 1.0 Message-Id: <0b873181-55ae-455d-af5b-71f3f95bdb6c@www.fastmail.com> In-Reply-To: <20211202025533.as5notbwgncsyb2v@localhost> References: <20211201074553.bzuoffwpaxw3da44.ref@localhost> <20211201074553.bzuoffwpaxw3da44@localhost> <20211202025533.as5notbwgncsyb2v@localhost> Date: Fri, 03 Dec 2021 15:20:35 +0100 From: Linus =?UTF-8?Q?Bj=C3=B6rnstam?= Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) 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 (-) It is the same bug. The r7rs define-library expands to a r6rs library, w= hich expands to a guile module form that lacks support for multiple libr= aries. The solution would probably include a non-trivial (but probably n= ot very big) change to guile's module system. First you would have to save and restore the current module before and a= fter a module definition (maybe in save-module-excursion?). Then I would= separate the library form the guile library form (since that doesn't en= capsulate the body), by expanding it directly to the lower level module = forms. I might give it a shot. --=20 Linus Bj=C3=B6rnstam On Thu, 2 Dec 2021, at 03:55, Sam Lee wrote: > On 2021-12-01 11:00 +0100, Linus Bj=C3=B6rnstam wrote: >> This is in line with the limitations of guile's R6RS implementation. I >> think this is a long standing, low priority bug. It has to do with the >> expansion of library (or define-library in this case) not properly >> resetting the current module. >> >> In the manual there is a section called "R6RS incompatibilities" that >> mentions this. Maybe an "R7RS incompatibilities" should be added. > > Hi Linus, > > There already exist a page in the manual about "Incompatibilities with > the R7RS" [1]. Perhaps a paragraph similar to that found in the R6RS > incompatibilities page should be added to the R7RS incompatibilities > page. Something like this: > > "Multiple @code{define-library} forms in one file are not yet supporte= d. > This is because the expansion of @code{define-library} sets the current > module, but does not restore it. This is a bug." > > [1]:=20 > https://www.gnu.org/software/guile/manual/html_node/R7RS-Incompatibili= ties.html