Maxim Cournoyer <maxim.cournoyer@HIDDEN>
to control <at> debbugs.gnu.org.
Full text available.
Received: (at 67255) by debbugs.gnu.org; 24 Nov 2023 21:02:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 24 16:02:09 2023
Received: from localhost ([127.0.0.1]:37334 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1r6dJQ-0005L7-PT
for submit <at> debbugs.gnu.org; Fri, 24 Nov 2023 16:02:09 -0500
Received: from mail-qt1-x833.google.com ([2607:f8b0:4864:20::833]:60651)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <maxim.cournoyer@HIDDEN>) id 1r6dJP-0005Ke-0c
for 67255 <at> debbugs.gnu.org; Fri, 24 Nov 2023 16:02:08 -0500
Received: by mail-qt1-x833.google.com with SMTP id
d75a77b69052e-41cbf31da84so11267471cf.0
for <67255 <at> debbugs.gnu.org>; Fri, 24 Nov 2023 13:02:02 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1700859716; x=1701464516; darn=debbugs.gnu.org;
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
:to:from:from:to:cc:subject:date:message-id:reply-to;
bh=xxYWfypCvfnbEu9h9Cz6x2qvHaPidKF0+g3h6/1R6WM=;
b=bfgUBTl9lkQrBohfHAKqNS9G9Zn5QAtVoCvkLfKniRmPCSjCDVqP7moP3bdX9EqYof
7TCNcqAIQJbazyN/Z1+iVye5I9dwefmhSjxlSRvRa0SCtyHSiWWJ2j+fwtnFhyYB4EAh
TB0pLy7VFwEBhrtiLcPfeuXWGW+FIFPXxyvWovMwieO7HrBh+/wHGYUASvJmrQGzZqWe
09f5JBlB3d0oZLXrfp4acQ1MJhOBylf07mpnHpG6erkik4GjvXd9KEBeXfjDsXXanjMV
IBI2YxGu7PSWsavSQeLT08SuAUzGUiYpfCN9fRfdmZ/hLrMuZpK7ch33sfYOXvUH1FQT
O9zA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1700859716; x=1701464516;
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
:to:from:x-gm-message-state:from:to:cc:subject:date:message-id
:reply-to;
bh=xxYWfypCvfnbEu9h9Cz6x2qvHaPidKF0+g3h6/1R6WM=;
b=DeIBJGlk5jZkGWZo0UEkPC+L8W+UQrJgjIqoPyxrpCoy/obwk4ehhWcW/JAIw/sMuk
nYSoPRsr2vnvc7fiqEure6ZhUaCKNUWgxE6lf7L7dkh9qYgbhUJt950DoORbD80X8N6z
3yHCNxbuxEAynC2Qftg4ewKEUR20WvUXamINW9c9hJJ5DC6l5eKtzoynTL0Efss6L3Zm
2SB0YGzOeQrT60T+1fwGEo5psARXG4dVq1ZTTKLvhFlrkM60/IQCpuxi2AAXGm5FTxPC
jHWOe26f6aQ+hDm6GDeyPLAL1tpwtpIwPDOOTNI5h+9rOMK9nK1TVlh9/HmLfWd/+moL
yg5A==
X-Gm-Message-State: AOJu0Yy1FKGGCyuvhMzi6T39pbb/SGutWD+XO1OhbaTa4nTKBQY6Z3fQ
60ZYCe4FSb2z12j1glUKSIrmYzRn/MA=
X-Google-Smtp-Source: AGHT+IGNlHeArypybJvsfX7rZ3c05jVFAxGTIvBvajN9I20nRb2mg8dzcDj+INBRyyFq9wXAVXyeMQ==
X-Received: by 2002:a05:622a:1aa2:b0:418:bdf:f4b with SMTP id
s34-20020a05622a1aa200b004180bdf0f4bmr5261716qtc.6.1700859716031;
Fri, 24 Nov 2023 13:01:56 -0800 (PST)
Received: from localhost.localdomain (dsl-158-42.b2b2c.ca. [66.158.158.42])
by smtp.gmail.com with ESMTPSA id
g26-20020ac870da000000b004166ab2e509sm1516318qtp.92.2023.11.24.13.01.55
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Fri, 24 Nov 2023 13:01:55 -0800 (PST)
From: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
To: 67255 <at> debbugs.gnu.org
Subject: [PATCH v2] Use R7RS 'rename' syntax for exports.
Date: Fri, 24 Nov 2023 16:01:39 -0500
Message-ID: <20231124210150.3428-1-maxim.cournoyer@HIDDEN>
X-Mailer: git-send-email 2.41.0
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 67255
Cc: Timothy Sample <samplet@HIDDEN>,
Maxim Cournoyer <maxim.cournoyer@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)
From: Timothy Sample <samplet@HIDDEN>
* module/ice-9/r7rs-libraries.scm (define-library): Convert R7RS
exports to R6RS exports before passing them on to 'library'.
Fixes: https://bugs.gnu.org/67255
Reported-by: Maxim Cournoyer <maxim.cournoyer@HIDDEN>.
Modified-by: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
---
Changes in v2:
- Improve pattern variable names
module/ice-9/r7rs-libraries.scm | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/module/ice-9/r7rs-libraries.scm b/module/ice-9/r7rs-libraries.scm
index 63a300a26..429d82ad9 100644
--- a/module/ice-9/r7rs-libraries.scm
+++ b/module/ice-9/r7rs-libraries.scm
@@ -1,5 +1,5 @@
;; R7RS library support
-;; Copyright (C) 2020, 2021 Free Software Foundation, Inc.
+;; Copyright (C) 2020, 2021, 2023 Free Software Foundation, Inc.
;;
;; This library is free software; you can redistribute it and/or
;; modify it under the terms of the GNU Lesser General Public
@@ -97,12 +97,18 @@
((decl ...)
(partition-decls #'(decl ... . decls) exports imports code))))))
+ (define (r7rs-export->r6rs-export export-spec)
+ (syntax-case export-spec (rename)
+ ((rename from-identifier to-identifier)
+ #'(rename (from-identifier to-identifier)))
+ (identifier #'identifier)))
+
(syntax-case stx ()
((_ name decl ...)
(call-with-values (lambda ()
(partition-decls #'(decl ...) '() '() '()))
(lambda (exports imports code)
#`(library name
- (export . #,exports)
+ (export . #,(map r7rs-export->r6rs-export exports))
(import . #,imports)
. #,code)))))))
base-commit: d579848cb5d65440af5afd9c8968628665554c22
--
2.41.0
bug-guile@HIDDEN:bug#67255; Package guile.
Full text available.
Received: (at 67255) by debbugs.gnu.org; 23 Nov 2023 16:12:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 23 11:12:35 2023
Received: from localhost ([127.0.0.1]:34778 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1r6CJf-00044s-6I
for submit <at> debbugs.gnu.org; Thu, 23 Nov 2023 11:12:35 -0500
Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:43267)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <samplet@HIDDEN>) id 1r6CJc-00044N-9C
for 67255 <at> debbugs.gnu.org; Thu, 23 Nov 2023 11:12:33 -0500
Received: from compute2.internal (compute2.nyi.internal [10.202.2.46])
by mailout.west.internal (Postfix) with ESMTP id 2C5EF3200AAB;
Thu, 23 Nov 2023 11:12:22 -0500 (EST)
Received: from mailfrontend1 ([10.202.2.162])
by compute2.internal (MEProxy); Thu, 23 Nov 2023 11:12:22 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ngyro.com; h=cc
:cc:content-transfer-encoding:content-type:content-type:date
:date:from:from:in-reply-to:in-reply-to:message-id:mime-version
:references:reply-to:sender:subject:subject:to:to; s=fm2; t=
1700755941; x=1700842341; bh=Z6Rlg3i4ST3WHa6vxazyGLuTRmA+KVAjjJp
j4F8Bdlg=; b=lOQa8ebYm6z7HIQZBx8p6U60uldd212fwkXQqwrD7Aia3mL0lqu
k0Koh5V8tcIbxZRrvbwW2R/UaIKpkfwqoQIUFhJbJOoNp/AKHOnrlqDWW3Pb5otM
IPYoutL+xBskcdquVeT5YpppxnU9tsv0yeTzzh2sSBuCgbOQ+aqjOB+mev06Oi6g
nByeUsyd4aerADJNavLiwDBHuZyzA9hHctBmJ+BlDr8S0sa9YROXkL7Iiw2pXBN1
5ruUCMMExQN3F+/rXgcPqKj0KMf+5LRMzTwJ2H0T8jMHiIP/M8gVCTejIAmYrCs0
b3AOHxVYnmB9qRiv765xkAG4XiX1sAEwv9A==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
messagingengine.com; h=cc:cc:content-transfer-encoding
:content-type:content-type:date:date:feedback-id:feedback-id
:from:from:in-reply-to:in-reply-to:message-id:mime-version
:references:reply-to:sender:subject:subject:to:to:x-me-proxy
:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=
1700755941; x=1700842341; bh=Z6Rlg3i4ST3WHa6vxazyGLuTRmA+KVAjjJp
j4F8Bdlg=; b=GP/UeWOt8phVJIHGGS4/pZ1ObXIDCKcCTKW7yvvomxfKsMcKnWO
WN1MeSioIOhFD0bDO9PvwaGJCaRJUtTdgGYcpVpr6CGfGp2ugWLma3ruyVbdVs7i
wKaugcJQ8D3TNpNqD9T3KSTIJ+g1K16XBW3iEeP8aG5W1H+JMMIr3/EQQwfFn5Pe
xVzeCN9cLvqxp6ckuoxMVtUBMFfPIToZm8Nn6PbQCaDoEuO/fXMR7A6IbGH2fgih
jPzbcpih9F+WQKtUg57emXg7EjuLCveJ3CEECfzRxCLWPOu1vGq7Jd42qdiDk2fn
811lkngi3fx9H/GicHeRvqYT9XTy1LccGXg==
X-ME-Sender: <xms:5XlfZVCcK8OLzEOjZZFZJsp73OmNKIFAyvUFT9AYbQWxgJMP3XpKgQ>
<xme:5XlfZTiKtwlxiFCd3Jr8zpQZPD6nEMA7nyNwL05upgaoyAmkX0n1KYLS2FZqDNZ6b
fwAvmhAWTGq_bUPig>
X-ME-Received: <xmr:5XlfZQmCVPx6GiF7ol7bRGRxlrw3qsaEE95YEz0ftdsF8OomRI9EZaiEddefH6W_SnDdmfVVRVlrG-XDk_Lonza51lNL2SBjZZ_q6Q>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudehfedgkeegucetufdoteggodetrfdotf
fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
cujfgurhephffvvefujghffffkfgggtgfgsehtqhertddtreejnecuhfhrohhmpefvihhm
ohhthhihucfurghmphhlvgcuoehsrghmphhlvghtsehnghihrhhordgtohhmqeenucggtf
frrghtthgvrhhnpeekfeejffeukeevffeufeevhfehgfdttedvteekveefffffgffgvdfh
veegtdekheenucffohhmrghinhepghhnuhdrohhrghenucevlhhushhtvghrufhiiigvpe
dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehsrghmphhlvghtsehnghihrhhordgtohhm
X-ME-Proxy: <xmx:5XlfZfzf_k--tD1IU-fkka_DE5nYy4TespHonW9lcdQ6_0caQoT29A>
<xmx:5XlfZaSKVU3D7bxs4pXooUDKihCpj0GfLzZ9OHwFa-GgSMUeGCzDWw>
<xmx:5XlfZSb8EVDhDp1ahqmWOfwNaMgfJOtSMKqUpCZf4jwRDkCuw8ommQ>
<xmx:5XlfZT53Qo4t-KizhdY7vjDke4qjtLx0Gk2AQslWL2uvElGcRJJDrA>
Feedback-ID: i4721425c:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu,
23 Nov 2023 11:12:20 -0500 (EST)
From: Timothy Sample <samplet@HIDDEN>
To: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Subject: Re: bug#67255: define-library does not support 'rename' directives
In-Reply-To: <87y1ep86kz.fsf@HIDDEN> (Maxim Cournoyer's message of "Wed, 22
Nov 2023 22:57:32 -0500")
References: <87r0knbome.fsf@HIDDEN> <87a5r84e1l.fsf@HIDDEN>
<87cyw42vpv.fsf@HIDDEN> <87y1ep86kz.fsf@HIDDEN>
Date: Thu, 23 Nov 2023 10:12:19 -0600
Message-ID: <87pm001mak.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 67255
Cc: 67255 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)
Hey,
Maxim Cournoyer <maxim.cournoyer@HIDDEN> writes:
> Timothy Sample <samplet@HIDDEN> writes:
>
>> Fixes <https://bugs.gnu.org/67255>.
>> Reported by Maxim Cournoyer <maxim.cournoyer@HIDDEN>.
>
> Nitpick: at least 'Reported-by' is a common git trailer, and these
> must appear at the bottom of the git commit.
That=E2=80=99s a fair point. I=E2=80=99m following what seems to be (from =
the commit
log) Guile=E2=80=99s convention here. See
$ git log --grep=3D'^Report'
Whether it=E2=80=99s a good convention is probably out of scope here! :)
> It at least works for my use case (SRFI 128), so it's for sure an
> improvement :-). You can see it in action in the series I've sent today.
Hooray!
-- Tim
bug-guile@HIDDEN:bug#67255; Package guile.
Full text available.Received: (at 67255) by debbugs.gnu.org; 23 Nov 2023 03:57:48 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 22 22:57:48 2023 Received: from localhost ([127.0.0.1]:60314 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1r60qZ-0004Xd-O7 for submit <at> debbugs.gnu.org; Wed, 22 Nov 2023 22:57:48 -0500 Received: from mail-qt1-x831.google.com ([2607:f8b0:4864:20::831]:50523) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>) id 1r60qX-0004XO-7j for 67255 <at> debbugs.gnu.org; Wed, 22 Nov 2023 22:57:46 -0500 Received: by mail-qt1-x831.google.com with SMTP id d75a77b69052e-42135f8e08fso2417251cf.1 for <67255 <at> debbugs.gnu.org>; Wed, 22 Nov 2023 19:57:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700711855; x=1701316655; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=YuhH+YSy4fj+SD/I2b5+tY6GC+CAyC1pud0sOfj/Mao=; b=GZKHAXOkdjaD3YVAGcT1ETy3Pd124y64ooP+G+etSI+k3zLOL1w+jp4mf5qtAJWQgM y3SgsKR8uradpnp48EaVa/i1lKd6b1V3RQ5VCy43IQZdFVL5d349iAqj/QtSOOtOz+J9 o63lDAGu0DU7MCe7JAO4uUvhb7mGB1lmOv4EeATcWmz6MO69siP7PxyO+m/NL03uJad5 bjZ+WlphyCIpRoWO3+qRvYrfCCs4/M4sohfOdXbD0+jVE1jiMov61KZaaryeUhd0jlJD O3kXdGE+9f7VbyLgNdVZXol2bAWBPFvU5jrzeUo/Yu9hGQEluKZqKeo2PmbRcTjDFFgz XG+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700711855; x=1701316655; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=YuhH+YSy4fj+SD/I2b5+tY6GC+CAyC1pud0sOfj/Mao=; b=O91gEi6ePLOWHYxKYjTMgan/Zu07dMz1LAJlxQ/LN5iPWJ1PfNHNXwRWyegta7K0su RX0ta7RpJKV7FGVcg7EE56yyxtYAiQijWxwhfHQSPMxDmjI7nXqQLdRI43T0wnY5Vdue LFQFjakJ1JsIhjlUS1nNogM1vV3rKxn96C3lhndFX4RR1n/+8NwchviVEDXviOYt8/jj NU3b1rSbJ6b/TjENZHfSHj8T7EBTYhySCH2Ey6WY7tE9e4Ddpoj6B1UzT9x8kMemPErE 1SKcXCj1B2hePRuZHagCOEKa1mjsPDF1DWZowTogcPYk0DOqy5dN/2Xcan6fq+28InwS ZEYg== X-Gm-Message-State: AOJu0Yy24Yn4xzLglrENniV0B/TGXBzNiGEnlI6Br3rbFLhNcHynXWP2 2HEEdCwV2ZYbYiwf32EKu4eBNGMNz9w= X-Google-Smtp-Source: AGHT+IFBqE55rIhq510PcCZwLJzyU7RhXyLrYpj5xewPjzsGMJ6wAIXHHJ36DaSBU94pg/xeM2V2rA== X-Received: by 2002:ac8:4e54:0:b0:423:7294:89aa with SMTP id e20-20020ac84e54000000b00423729489aamr5694138qtw.42.1700711853522; Wed, 22 Nov 2023 19:57:33 -0800 (PST) Received: from hurd (dsl-205-233-124-102.b2b2c.ca. [205.233.124.102]) by smtp.gmail.com with ESMTPSA id t2-20020ac87602000000b00421c272bcbasm162907qtq.11.2023.11.22.19.57.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 19:57:33 -0800 (PST) From: Maxim Cournoyer <maxim.cournoyer@HIDDEN> To: Timothy Sample <samplet@HIDDEN> Subject: Re: bug#67255: define-library does not support 'rename' directives In-Reply-To: <87cyw42vpv.fsf@HIDDEN> (Timothy Sample's message of "Mon, 20 Nov 2023 11:14:20 -0600") References: <87r0knbome.fsf@HIDDEN> <87a5r84e1l.fsf@HIDDEN> <87cyw42vpv.fsf@HIDDEN> Date: Wed, 22 Nov 2023 22:57:32 -0500 Message-ID: <87y1ep86kz.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 67255 Cc: 67255 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Hello! Timothy Sample <samplet@HIDDEN> writes: > Timothy Sample <samplet@HIDDEN> writes: > >> Maxim Cournoyer <maxim.cournoyer@HIDDEN> writes: >> >>> Our R7RS define-library syntax, from (ice-9 r7rs-library) does not >>> support renaming bindings to export, via 'rename' directives. >> >> I appreciate your R7RS debugging effort. Thanks! > > Actions speak louder than words, so here=E2=80=99s a patch! > > The =E2=80=98define-library=E2=80=99 syntax uses the R6RS =E2=80=98librar= y=E2=80=99 syntax under the > hood. TIL that R6RS and R7RS have different syntax for 'rename'. In > R6RS, you write: > > (export (rename (internal external))) > > while in R7RS, it=E2=80=99s: > > (export (rename internal external)) > > My patch adds a conversion step to deal with this difference. Oh, excellent, thank you! >>From b87bf8910ac8e75dc0ec63cb7385ddf199fd400c Mon Sep 17 00:00:00 2001 > From: Timothy Sample <samplet@HIDDEN> > Date: Mon, 20 Nov 2023 11:01:08 -0600 > Subject: [PATCH] Use R7RS 'rename' syntax for exports. > > Fixes <https://bugs.gnu.org/67255>. > Reported by Maxim Cournoyer <maxim.cournoyer@HIDDEN>. Nitpick: at least 'Reported-by' is a common git trailer, and these must appear at the bottom of the git commit. > * module/ice-9/r7rs-libraries.scm (define-library): Convert R7RS > exports to R6RS exports before passing them on to 'library'. > --- > module/ice-9/r7rs-libraries.scm | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/module/ice-9/r7rs-libraries.scm b/module/ice-9/r7rs-librarie= s.scm > index 63a300a26..f8b6b4c59 100644 > --- a/module/ice-9/r7rs-libraries.scm > +++ b/module/ice-9/r7rs-libraries.scm > @@ -1,5 +1,5 @@ > ;; R7RS library support > -;; Copyright (C) 2020, 2021 Free Software Foundation, Inc. > +;; Copyright (C) 2020, 2021, 2023 Free Software Foundation, Inc. > ;; > ;; This library is free software; you can redistribute it and/or > ;; modify it under the terms of the GNU Lesser General Public > @@ -97,12 +97,17 @@ > ((decl ...) > (partition-decls #'(decl ... . decls) exports imports code))= )))) >=20=20 > + (define (r7rs-export->r6rs-export export) > + (syntax-case export (rename) > + ((rename internal external) #'(rename (internal external))) > + (_ export))) > + > (syntax-case stx () > ((_ name decl ...) > (call-with-values (lambda () > (partition-decls #'(decl ...) '() '() '())) > (lambda (exports imports code) > #`(library name > - (export . #,exports) > + (export . #,(map r7rs-export->r6rs-export exports)) > (import . #,imports) > . #,code))))))) It at least works for my use case (SRFI 128), so it's for sure an improvement :-). You can see it in action in the series I've sent today. --=20 Thanks, Maxim
bug-guile@HIDDEN:bug#67255; Package guile.
Full text available.
Received: (at 67255) by debbugs.gnu.org; 20 Nov 2023 17:14:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 20 12:14:35 2023
Received: from localhost ([127.0.0.1]:54356 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1r57r1-0008TK-Av
for submit <at> debbugs.gnu.org; Mon, 20 Nov 2023 12:14:35 -0500
Received: from out4-smtp.messagingengine.com ([66.111.4.28]:55387)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <samplet@HIDDEN>) id 1r57qw-0008Sx-T7
for 67255 <at> debbugs.gnu.org; Mon, 20 Nov 2023 12:14:34 -0500
Received: from compute5.internal (compute5.nyi.internal [10.202.2.45])
by mailout.nyi.internal (Postfix) with ESMTP id 714DD5C0C2E;
Mon, 20 Nov 2023 12:14:22 -0500 (EST)
Received: from mailfrontend1 ([10.202.2.162])
by compute5.internal (MEProxy); Mon, 20 Nov 2023 12:14:22 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ngyro.com; h=cc
:cc:content-type:content-type:date:date:from:from:in-reply-to
:in-reply-to:message-id:mime-version:references:reply-to:sender
:subject:subject:to:to; s=fm2; t=1700500462; x=1700586862; bh=c0
KoduvwaCIm9dTGPQAe8S7z/TL9FxjZp95qOvyiLRQ=; b=D/xKDD2BA7ehsVhBHX
UqKX0OxUrVe0BBrF1vVwa+N2d3L8KD7EiSFf8D41x8ifuszNY87YCQHEpj0grXxC
2gOjcTTMt06nqRIQcuYtHvNcARnzUkBHbse8zYxBO/MGGfcQZcRrOP9q6oaPpFnn
DXnYqHC5WUrWaVI54ryBZOlbgIFlTOsC4M69f/586uCT7qAHRdZjpFdMFlQDSBuG
HI4KKnn+ySVqD8OJxVIlmxxSpdNW7OYHWljODmzz4Y9qkjyqHXEjx8AeEs8c3cki
A0KHmJ/5yy8PiXmFgSY3qfcoc5dHKTv69VogXBgFtZYhYUrrifULFeD26Vz3rvlj
tqaA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
messagingengine.com; h=cc:cc:content-type:content-type:date:date
:feedback-id:feedback-id:from:from:in-reply-to:in-reply-to
:message-id:mime-version:references:reply-to:sender:subject
:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender
:x-sasl-enc; s=fm1; t=1700500462; x=1700586862; bh=c0KoduvwaCIm9
dTGPQAe8S7z/TL9FxjZp95qOvyiLRQ=; b=0NVbGKMZsAZzSPnXAtrUsEH80kge7
7tpW4HwCINsfySSms/rUSz2T5I+Ywf4dJIxpURncSQ8d0MyawFqr5uuNlkSU6TBp
5FPQ9GvS9lX+8Ojwhcw6jCXHhItYFg+hDqCJVCzZPOEs+RHIuCHay4cP1MZr5IBs
u5EY9qMinRqNyaNu2olDLaZtdim2fuGo6fUHvPZrxI7o9trA7VGhfnytDUFWO//0
omH4uE7bu0gt0kf9UIMKx2lHxR+MjGBMfH07F0+38eQGmlErnca1KNOlbJjOIJi5
X0rFetBu90RbYrtgZwkVEsKiWklMS+1F9gca4Zmlj0Ll6LMet0tVgjvvw==
X-ME-Sender: <xms:7pNbZZE_IhdrFThFL1kG54uohjF7mUHJOLlGhlyr0RdaGjDrwFlMFg>
<xme:7pNbZeVyUz56nE6HZ7fRjJzUtCtfpGmlPj8mK6-G5wnPE4Tg2YKCBQ35FOQkjBi0B
mGbEIXRzNMseNvxjA>
X-ME-Received: <xmr:7pNbZbIBPvumFW00fV4-rCQZQk15Me-FEylG8xXsGK4pQQG4O5udMDN3yF2MhbdYzqwr-Dtc2Ye04bso9KNLks7kJfhLtB4jS1d8rQ>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudegjedgjedvucetufdoteggodetrfdotf
fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
cujfgurhephffvvefujghffffkfgggtgesmhdtreertderjeenucfhrhhomhepvfhimhho
thhhhicuufgrmhhplhgvuceoshgrmhhplhgvthesnhhghihrohdrtghomheqnecuggftrf
grthhtvghrnhepteevvddtveefgefgteelueehheffgeeuhfdvgfeuhfehhedthedvueeu
udehfedunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh
epshgrmhhplhgvthesnhhghihrohdrtghomh
X-ME-Proxy: <xmx:7pNbZfEQ6N9PfPI_qK14juJyw20nA67aywV7ksJdoGqtH8aA62v6SA>
<xmx:7pNbZfWAd60zWX41vQJqO7HMpmXm7kvU5KI-fSuYKuzv4xcrixC3wQ>
<xmx:7pNbZaOigBKYzMF2V5M3MKVKRlP5LRUeaoYtN7LS2HsZFxgWxsQkuA>
<xmx:7pNbZQfjEtuMwlFI2XqvH1d3y1apOOMBmPN_zA-s5FXcmgsxMXVmCw>
Feedback-ID: i4721425c:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon,
20 Nov 2023 12:14:21 -0500 (EST)
From: Timothy Sample <samplet@HIDDEN>
To: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Subject: Re: bug#67255: define-library does not support 'rename' directives
In-Reply-To: <87a5r84e1l.fsf@HIDDEN> (Timothy Sample's message of "Mon, 20
Nov 2023 09:53:10 -0600")
References: <87r0knbome.fsf@HIDDEN> <87a5r84e1l.fsf@HIDDEN>
Date: Mon, 20 Nov 2023 11:14:20 -0600
Message-ID: <87cyw42vpv.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 67255
Cc: 67255 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)
--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Timothy Sample <samplet@HIDDEN> writes:
> Maxim Cournoyer <maxim.cournoyer@HIDDEN> writes:
>
>> Our R7RS define-library syntax, from (ice-9 r7rs-library) does not
>> support renaming bindings to export, via 'rename' directives.
>
> I appreciate your R7RS debugging effort. Thanks!
Actions speak louder than words, so here=E2=80=99s a patch!
The =E2=80=98define-library=E2=80=99 syntax uses the R6RS =E2=80=98library=
=E2=80=99 syntax under the
hood. TIL that R6RS and R7RS have different syntax for 'rename'. In
R6RS, you write:
(export (rename (internal external)))
while in R7RS, it=E2=80=99s:
(export (rename internal external))
My patch adds a conversion step to deal with this difference.
--=-=-=
Content-Type: text/x-patch
Content-Disposition: inline;
filename=0001-Use-R7RS-rename-syntax-for-exports.patch
From b87bf8910ac8e75dc0ec63cb7385ddf199fd400c Mon Sep 17 00:00:00 2001
From: Timothy Sample <samplet@HIDDEN>
Date: Mon, 20 Nov 2023 11:01:08 -0600
Subject: [PATCH] Use R7RS 'rename' syntax for exports.
Fixes <https://bugs.gnu.org/67255>.
Reported by Maxim Cournoyer <maxim.cournoyer@HIDDEN>.
* module/ice-9/r7rs-libraries.scm (define-library): Convert R7RS
exports to R6RS exports before passing them on to 'library'.
---
module/ice-9/r7rs-libraries.scm | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/module/ice-9/r7rs-libraries.scm b/module/ice-9/r7rs-libraries.scm
index 63a300a26..f8b6b4c59 100644
--- a/module/ice-9/r7rs-libraries.scm
+++ b/module/ice-9/r7rs-libraries.scm
@@ -1,5 +1,5 @@
;; R7RS library support
-;; Copyright (C) 2020, 2021 Free Software Foundation, Inc.
+;; Copyright (C) 2020, 2021, 2023 Free Software Foundation, Inc.
;;
;; This library is free software; you can redistribute it and/or
;; modify it under the terms of the GNU Lesser General Public
@@ -97,12 +97,17 @@
((decl ...)
(partition-decls #'(decl ... . decls) exports imports code))))))
+ (define (r7rs-export->r6rs-export export)
+ (syntax-case export (rename)
+ ((rename internal external) #'(rename (internal external)))
+ (_ export)))
+
(syntax-case stx ()
((_ name decl ...)
(call-with-values (lambda ()
(partition-decls #'(decl ...) '() '() '()))
(lambda (exports imports code)
#`(library name
- (export . #,exports)
+ (export . #,(map r7rs-export->r6rs-export exports))
(import . #,imports)
. #,code)))))))
--
2.41.0
--=-=-=--
bug-guile@HIDDEN:bug#67255; Package guile.
Full text available.
Received: (at 67255) by debbugs.gnu.org; 20 Nov 2023 15:53:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 20 10:53:24 2023
Received: from localhost ([127.0.0.1]:54333 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1r56aR-0005rK-Fz
for submit <at> debbugs.gnu.org; Mon, 20 Nov 2023 10:53:23 -0500
Received: from out1-smtp.messagingengine.com ([66.111.4.25]:41599)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <samplet@HIDDEN>) id 1r56aO-0005r5-N1
for 67255 <at> debbugs.gnu.org; Mon, 20 Nov 2023 10:53:22 -0500
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41])
by mailout.nyi.internal (Postfix) with ESMTP id AFE855C0828;
Mon, 20 Nov 2023 10:53:12 -0500 (EST)
Received: from mailfrontend1 ([10.202.2.162])
by compute1.internal (MEProxy); Mon, 20 Nov 2023 10:53:12 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ngyro.com; h=cc
:cc:content-transfer-encoding:content-type:content-type:date
:date:from:from:in-reply-to:in-reply-to:message-id:mime-version
:references:reply-to:sender:subject:subject:to:to; s=fm2; t=
1700495592; x=1700581992; bh=9e84CpUXlBmJlFPIAbTmAwkS71nEwhXbRC2
F3t/DTR0=; b=lUnpHTdfBRlcKYeQFG2gmBZHY+eRzmcu2Cn2eaOujj/yv1+atCW
iZ1/bCU50O38TfmoIxWIRHVE7B9QdBfwSVdIUWCSQjceLst+W0FEMm7Tjwn+uKNN
ENkRUDl1p4n2q/SxDXvE5R6Z5iQ7Dubp2JfYQs2aE5yz0ff8zCAXulXKZGelQdGL
ONCLONj0q7eSfN/fkCsakGMaJubmboQIrPL9H622G08ebcvhvCfmj9CZjzk617Fx
YDXUnXiiadaUytwbNmjf+wR5bVBGb3iUBgDbutJeVX0vjV7okn8rATNRD9cbsCmn
A64Ki8RCIWm6DHgl+WtHi94sCiVv3ZGghfA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
messagingengine.com; h=cc:cc:content-transfer-encoding
:content-type:content-type:date:date:feedback-id:feedback-id
:from:from:in-reply-to:in-reply-to:message-id:mime-version
:references:reply-to:sender:subject:subject:to:to:x-me-proxy
:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=
1700495592; x=1700581992; bh=9e84CpUXlBmJlFPIAbTmAwkS71nEwhXbRC2
F3t/DTR0=; b=XH8WyCXMLB7Z7wTXG1OICAsCv2CGnO7BQZv49PYkPM6p0fqh1O9
AxUk3BJ74wsyoD6qqvH/z3rKEIFlAEMv9Wr+zXjj8kTAt8CFwiEWmvIS9D4WCRNB
IxRepqG/8gmDCq+BKSh/SfKw0WyaJY6s0axxJPVCtz5ckSdQ7Lg5KeObscOr4Lai
/Azbzkr/beyDq5w/K4Pu57m3CbeEmqy1md8X8Wt3LSPP5e+jW9u2/QVQ1AjlPphl
xfGMKPu/Bx8VtuYD2uWNHrYZTZGMpVEfkGgwIaOIrxEWekY/KOe4I2V9xvYEpNBr
keQVyg2c0VJ5p3dxcDfpKhNPR/+0lGr5ZYw==
X-ME-Sender: <xms:6IBbZZSliraQuSs8bj9DHJ7NvqaRDxJFq-gKR5fTH5Ujdg54LoDdeQ>
<xme:6IBbZSyUMY6K-wgEfoj2ORQzaSVJw60C-io4lfIWRumW1SO9XW9kRieyslpGuGpQ8
urwITNWIrIkZEbO-g>
X-ME-Received: <xmr:6IBbZe32K84Qb9W6Ul8XppWAeMx7oybdS2A9eJIh5PkilPDeYsdwPqgVniHG2R6oIMOPbyq60N-D-seyIKLdK3rRysv2RaQItNJUhw>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudegjedgheehucetufdoteggodetrfdotf
fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
cujfgurhephffvvefujghffffkfgggtgfgsehtqhertddtreejnecuhfhrohhmpefvihhm
ohhthhihucfurghmphhlvgcuoehsrghmphhlvghtsehnghihrhhordgtohhmqeenucggtf
frrghtthgvrhhnpeetfeffffettdelveekgfeffeevudehhedtffdvfffhudethfefvddu
udejlefhvdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh
hmpehsrghmphhlvghtsehnghihrhhordgtohhm
X-ME-Proxy: <xmx:6IBbZRB98LWKOjXOq3h4PtjHn6SQONsdGNXrAiE74KyNW4Ejxr0WnQ>
<xmx:6IBbZShkxe6OAB2uZdsoq5Fj506hlZfAm4yCvcHe8tcTM3JWJb0nKw>
<xmx:6IBbZVoxzofOrIh3DJtteri15i_YOEUi7v6AWTuaV49CfWKQfLSMsA>
<xmx:6IBbZaIklu0FhSKwIP6HgU0bE4asPHItctFvZwaeSyLVS9utdTRNig>
Feedback-ID: i4721425c:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon,
20 Nov 2023 10:53:11 -0500 (EST)
From: Timothy Sample <samplet@HIDDEN>
To: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Subject: Re: bug#67255: define-library does not support 'rename' directives
In-Reply-To: <87r0knbome.fsf@HIDDEN> (Maxim Cournoyer's message of "Sat, 18
Nov 2023 00:46:01 -0500")
References: <87r0knbome.fsf@HIDDEN>
Date: Mon, 20 Nov 2023 09:53:10 -0600
Message-ID: <87a5r84e1l.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 67255
Cc: 67255 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)
Hi Maxim,
Maxim Cournoyer <maxim.cournoyer@HIDDEN> writes:
> Our R7RS define-library syntax, from (ice-9 r7rs-library) does not
> support renaming bindings to export, via 'rename' directives.
I appreciate your R7RS debugging effort. Thanks!
> Our define-module syntax does not have such a feature (of renaming
> *exported* bindings), so this would seem to require new development on
> that side first.
I believe you=E2=80=99re mistaken. At least, the manual says:
-- syntax: export variable ...
Add all VARIABLEs (which must be symbols or pairs of symbols) to
the list of exported bindings of the current module. If VARIABLE
is a pair, its =E2=80=98car=E2=80=99 gives the name of the variable as=
seen by the
current module and its =E2=80=98cdr=E2=80=99 specifies a name for the =
binding in
the current module=E2=80=99s public interface.
Using pairs in Guile=E2=80=99s =E2=80=98export=E2=80=99 (or =E2=80=98#:expo=
rt=E2=80=99 in =E2=80=98define-module=E2=80=99)
should be the same as =E2=80=98rename=E2=80=99 from R7RS.
HTH!
-- Tim
bug-guile@HIDDEN:bug#67255; Package guile.
Full text available.
Received: (at submit) by debbugs.gnu.org; 18 Nov 2023 05:46:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 18 00:46:16 2023
Received: from localhost ([127.0.0.1]:47453 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1r4E9n-0001k0-GM
for submit <at> debbugs.gnu.org; Sat, 18 Nov 2023 00:46:15 -0500
Received: from lists.gnu.org ([2001:470:142::17]:52298)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <maxim.cournoyer@HIDDEN>) id 1r4E9k-0001jl-Uu
for submit <at> debbugs.gnu.org; Sat, 18 Nov 2023 00:46:14 -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 <maxim.cournoyer@HIDDEN>)
id 1r4E9d-0006qk-NM
for bug-guile@HIDDEN; Sat, 18 Nov 2023 00:46:05 -0500
Received: from mail-qt1-x82f.google.com ([2607:f8b0:4864:20::82f])
by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
(Exim 4.90_1) (envelope-from <maxim.cournoyer@HIDDEN>)
id 1r4E9c-0007GC-6L
for bug-guile@HIDDEN; Sat, 18 Nov 2023 00:46:05 -0500
Received: by mail-qt1-x82f.google.com with SMTP id
d75a77b69052e-41eb4210383so15503931cf.0
for <bug-guile@HIDDEN>; Fri, 17 Nov 2023 21:46:03 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1700286363; x=1700891163; darn=gnu.org;
h=mime-version:message-id:date:subject:to:from:from:to:cc:subject
:date:message-id:reply-to;
bh=YuQDvq4Ek3lIgR0chsKmheebqN8Rgky+T3LUOSHPDoU=;
b=d+Qa+6cwXYr9ZePdOd87E7uAdf9+nHfVinpfyl3C4Tt0GfOSY/HT+jhAPZ9N1AKola
d3Jd1icbPrCzE+Y8IcEtqqr7VGcukfYLkjKBNM6tMX3WmP3lGpECzS0ZOzy/DjKEMH8x
B0liHECeLiWz9kUFhvi0lWeEZdmepTK6dKGLrm+37Idz5YSCvGBjFF5Wa4WfQi1EpbeX
kkTlewVCMqpcODewSxa7KH6xJ8VouyynvwaUEAPPeldaVE+hx03ePQ4rJ/oPQLxyPAQf
WTV+4FxcP1TtPjAYinlpv/kHm4LMgX/L6NHi6clAexkrEzPJku0Z/Stcwmb/P0RzikLd
Yt5Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1700286363; x=1700891163;
h=mime-version:message-id:date:subject:to:from:x-gm-message-state
:from:to:cc:subject:date:message-id:reply-to;
bh=YuQDvq4Ek3lIgR0chsKmheebqN8Rgky+T3LUOSHPDoU=;
b=PXh+9EObqZO1gHZLZuxfrjP+I45WUB4yNuqUYBj7rfJMUytxe1OcmJThLON5DeFNE7
ndVTQbC4bDoWRmI3fJ9EIPMMt9PQsFksIGuljOk3WFEDhTMa2jbOsg4/EMG0LBE5EGn6
4ivgZLLVgm1uLuos1kko2OIMTToEGPavq+1TbYZk0pzkZcH/iVUROAr82eNBKlKuKMmd
aBUUFvJs1koXsrJmbOkirE4kUR92zyJabqcCTgoMgs9RF9qAiE+z3juRVzK9CpSQkVF5
rO/gRiDkk7C3n3SSYT/Ti8DBlw12y71EUwfM9+jd87QTkDfbq0f7NO35h7h/ZPXfjGWU
fr5A==
X-Gm-Message-State: AOJu0YzRJOQg5k2CVmowUpBzwXzixJVxJoWXkH31PdjWe+vvv79C7eWd
Cu2Pr8PIO15qujlhHLoV7kC/TxT3Kyo=
X-Google-Smtp-Source: AGHT+IFpTziLBdgGHvy2/dt4SknOP63JGLPUIZ6xhyn17xuqEE6CcB7nYV/VjNOWALaUDBPDPwOGHg==
X-Received: by 2002:a05:620a:2606:b0:773:cb13:cb7d with SMTP id
z6-20020a05620a260600b00773cb13cb7dmr1953645qko.48.1700286362684;
Fri, 17 Nov 2023 21:46:02 -0800 (PST)
Received: from hurd (dsl-154-55.b2b2c.ca. [66.158.154.55])
by smtp.gmail.com with ESMTPSA id
g4-20020a05620a278400b0076f16e98851sm1124408qkp.102.2023.11.17.21.46.01
for <bug-guile@HIDDEN>
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Fri, 17 Nov 2023 21:46:02 -0800 (PST)
From: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
To: bug-guile <bug-guile@HIDDEN>
Subject: define-library does not support 'rename' directives
Date: Sat, 18 Nov 2023 00:46:01 -0500
Message-ID: <87r0knbome.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=2607:f8b0:4864:20::82f;
envelope-from=maxim.cournoyer@HIDDEN; helo=mail-qt1-x82f.google.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, FREEMAIL_FROM=0.001,
RCVD_IN_DNSWL_NONE=-0.0001, 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 <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)
Hi,
Our R7RS define-library syntax, from (ice-9 r7rs-library) does not
support renaming bindings to export, via 'rename' directives. For
example, attempting to build srfi/125.sld, which reads:
--8<---------------cut here---------------start------------->8---
(define-library (srfi srfi-125)
(export
make-hash-table
hash-table
hash-table-unfold
alist->hash-table
hash-table?
hash-table-contains?
hash-table-empty?
hash-table=?
hash-table-mutable?
hash-table-ref
hash-table-ref/default
hash-table-set!
hash-table-delete!
hash-table-intern!
hash-table-update!
hash-table-update!/default
hash-table-pop!
hash-table-clear!
hash-table-size
hash-table-keys
hash-table-values
hash-table-entries
hash-table-find
hash-table-count
hash-table-map
hash-table-for-each
hash-table-map!
hash-table-map->list
hash-table-fold
hash-table-prune!
hash-table-copy
hash-table-empty-copy
hash-table->alist
hash-table-union!
hash-table-intersection!
hash-table-difference!
hash-table-xor!
;; The following procedures are deprecated by SRFI 125:
(rename deprecated:hash hash)
(rename deprecated:string-hash string-hash)
(rename deprecated:string-ci-hash string-ci-hash)
(rename deprecated:hash-by-identity hash-by-identity)
(rename deprecated:hash-table-equivalence-function
hash-table-equivalence-function)
(rename deprecated:hash-table-hash-function hash-table-hash-function)
(rename deprecated:hash-table-exists? hash-table-exists?)
(rename deprecated:hash-table-walk hash-table-walk)
(rename deprecated:hash-table-merge! hash-table-merge!)
)
(import (scheme base)
(scheme write) ; for warnings about deprecated features
(srfi 126)
(except (srfi 128)
hash-salt ; exported by (srfi 126)
string-hash ; exported by (srfi 126)
string-ci-hash ; exported by (srfi 126)
symbol-hash ; exported by (srfi 126)
))
(cond-expand
((library (scheme char))
(import (scheme char)))
(else
(begin (define string-ci=? string=?))))
(include "srfi-125/125.body.scm")
)
--8<---------------cut here---------------end--------------->8---
Fails with:
--8<---------------cut here---------------start------------->8---
$ ./meta/guild compile -W3 ./module/srfi/srfi-125.scm
/module/srfi/srfi-128.scm.go
ice-9/boot-9.scm:1682:22: In procedure raise-exception:
Syntax error:
unknown location: source expression failed to match any pattern in form ((rename deprecated:hash hash) (rename deprecated:string-hash string-hash) (rename deprecated:string-ci-hash string-ci-hash) (rename deprecated:hash-by-identity hash-by-identity) (rename deprecated:hash-table-equivalence-function hash-table-equivalence-function) (rename deprecated:hash-table-hash-function hash-table-hash-function) (rename deprecated:hash-table-exists? hash-table-exists?) (rename deprecated:hash-table-walk hash-table-walk) (rename deprecated:hash-table-merge! hash-table-merge!))
--8<---------------cut here---------------end--------------->8---
Our define-module syntax does not have such a feature (of renaming
*exported* bindings), so this would seem to require new development on
that side first.
--
Thanks,
Maxim
Maxim Cournoyer <maxim.cournoyer@HIDDEN>:bug-guile@HIDDEN.
Full text available.bug-guile@HIDDEN:bug#67255; Package guile.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.