From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Linus =?UTF-8?Q?Bj=C3=B6rnstam?= Newsgroups: gmane.lisp.guile.bugs Subject: bug#52218: Unable to define more than one R7RS library per file Date: Fri, 03 Dec 2021 15:20:35 +0100 Message-ID: <0b873181-55ae-455d-af5b-71f3f95bdb6c@www.fastmail.com> References: <20211201074553.bzuoffwpaxw3da44.ref@localhost> <20211201074553.bzuoffwpaxw3da44@localhost> <20211202025533.as5notbwgncsyb2v@localhost> Mime-Version: 1.0 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22727"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Cyrus-JMAP/3.5.0-alpha0-4458-g51a91c06b2-fm-20211130.004-g51a91c06 Cc: 52218@debbugs.gnu.org To: "Sam Lee" Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Fri Dec 03 15:22:12 2021 Return-path: Envelope-to: guile-bugs@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 1mt9Ry-0005cC-J7 for guile-bugs@m.gmane-mx.org; Fri, 03 Dec 2021 15:22:12 +0100 Original-Received: from localhost ([::1]:44928 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mt9Rx-0006Ho-EI for guile-bugs@m.gmane-mx.org; Fri, 03 Dec 2021 09:22:09 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:48560) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mt9Rq-0006FP-MK for bug-guile@gnu.org; Fri, 03 Dec 2021 09:22:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38782) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mt9Rq-0003tC-Eq for bug-guile@gnu.org; Fri, 03 Dec 2021 09:22:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mt9Rq-0004QT-1s for bug-guile@gnu.org; Fri, 03 Dec 2021 09:22:02 -0500 X-Loop: help-debbugs@gnu.org 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 Original-Received: via spool by 52218-submit@debbugs.gnu.org id=B52218.163854126816935 (code B ref 52218); Fri, 03 Dec 2021 14:22:02 +0000 Original-Received: (at 52218) by debbugs.gnu.org; 3 Dec 2021 14:21:08 +0000 Original-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 Original-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 Original-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) Original-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: Original-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 In-Reply-To: <20211202025533.as5notbwgncsyb2v@localhost> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.io gmane.lisp.guile.bugs:10221 Archived-At: 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