From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Maxim Cournoyer Newsgroups: gmane.lisp.guile.bugs Subject: bug#67412: [PATCH v2 1/2] Use R7RS 'rename' syntax for exports. Date: Fri, 24 Nov 2023 16:19:05 -0500 Message-ID: <20231124212033.18967-1-maxim.cournoyer@gmail.com> References: <87o7fk6yp8.fsf@gmail.com> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4247"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Timothy Sample , Maxim Cournoyer To: 67412@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Fri Nov 24 22:21:21 2023 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 1r6dc1-0000vB-QH for guile-bugs@m.gmane-mx.org; Fri, 24 Nov 2023 22:21:21 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r6dbf-0005Yl-VB; Fri, 24 Nov 2023 16:20:59 -0500 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 1r6dbe-0005YN-Fg for bug-guile@gnu.org; Fri, 24 Nov 2023 16:20:58 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r6dbe-0000j0-4d for bug-guile@gnu.org; Fri, 24 Nov 2023 16:20:58 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r6dbi-0005rU-EB for bug-guile@gnu.org; Fri, 24 Nov 2023 16:21:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <87o7fk6yp8.fsf@gmail.com> Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Fri, 24 Nov 2023 21:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67412 X-GNU-PR-Package: guile Original-Received: via spool by 67412-submit@debbugs.gnu.org id=B67412.170086085222503 (code B ref 67412); Fri, 24 Nov 2023 21:21:02 +0000 Original-Received: (at 67412) by debbugs.gnu.org; 24 Nov 2023 21:20:52 +0000 Original-Received: from localhost ([127.0.0.1]:37341 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6dbX-0005qn-Ok for submit@debbugs.gnu.org; Fri, 24 Nov 2023 16:20:52 -0500 Original-Received: from mail-qk1-x72e.google.com ([2607:f8b0:4864:20::72e]:53373) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6dbV-0005qY-Nq for 67412@debbugs.gnu.org; Fri, 24 Nov 2023 16:20:50 -0500 Original-Received: by mail-qk1-x72e.google.com with SMTP id af79cd13be357-77d84f8808dso35520985a.2 for <67412@debbugs.gnu.org>; Fri, 24 Nov 2023 13:20:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700860839; x=1701465639; 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=cSuHVk3r1d54szsBvDBsBL9HBWp10BnbbHHpEBRuw+w=; b=iHKfw5dfYUa5FWaAFIoViW3CS0Vc1BKVkw2b/T2G2N23CX/DsiSVfboZFWekSx54Sr nSptAXFUruQDUbvur5wrxfxA58Y6PbhQRU9geAeHhdIvLIFLF+HkNaO4bkv6hxjiW8Ok CMpY0LU5OHw2IH5lLkR8oiBfnsP8FLvAfQClSsq2POWebpNxTqI06QOi/z6S0rfrzJSB c39nMO2wPyZHytXZPLbjomt4WlAyQLIb3ffHZz4Uj5X/PyFM4HAZfxfXUGKcFkBFFJAi 4o7kwlSfx6C2wVMmTfultdjzyLmlNQHg823uMidT6y6LDGIKP29z8vi/M7J+/6D0/Cl2 phDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700860839; x=1701465639; 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=cSuHVk3r1d54szsBvDBsBL9HBWp10BnbbHHpEBRuw+w=; b=bpdRhkqzzvivuR4B6M1j4ENauOtjpo1NovGzybKUpjwLQr2QKGb69+l9Yqa3wMozsD Z8AwSkaH9Rx5tG5L6tmYvAf8YepXwhHawKnUyEyV0dhtL1b3f2xyqSJdYVnIzfOos1/j 7dzAvdgTI2Woqc2/0mIkt4pCQjeWr9ZsVgUCYf2UMiVei8+/AVtfOtBNEnNK6SPHqc6v VJAxelMSPXOPf3hTJPmYkUoY3+rIizphHDOeG0Ps8BGDYGhHapsjSXADhUXTNXHDTOXN XCx38nxtUownRhqH6FLkOsmA5TrKPRDuPRvAFhp7sVYQwMd+Ysrp6iP8AOpsv3AUkVAU 5bWA== X-Gm-Message-State: AOJu0Yzd2jE2LvYDsPZ9Re8uiVu8kdJl31aQbg98nGPD4/ssuxzQHouD sOYCW2DR/TsnRzuVItFEWcSxxXSNnKM= X-Google-Smtp-Source: AGHT+IFDpgZ/15DauNM6Ki+iq8BpccriWYNiKzgSX4XT21ago67Q1/mq3cTLtd/XvFprgN95pMWwpA== X-Received: by 2002:a05:620a:6844:b0:77d:72c2:8561 with SMTP id ru4-20020a05620a684400b0077d72c28561mr4503011qkn.55.1700860838874; Fri, 24 Nov 2023 13:20:38 -0800 (PST) Original-Received: from localhost.localdomain (dsl-158-42.b2b2c.ca. [66.158.158.42]) by smtp.gmail.com with ESMTPSA id w28-20020a05620a0e9c00b0077d5d1461aesm1504001qkm.31.2023.11.24.13.20.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 13:20:38 -0800 (PST) X-Mailer: git-send-email 2.41.0 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-bounces+guile-bugs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.bugs:10721 Archived-At: From: Timothy Sample * 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 . Modified-by: Maxim Cournoyer --- (no changes since v1) 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