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 1/2] Use R7RS 'rename' syntax for exports. Date: Fri, 24 Nov 2023 11:39:29 -0500 Message-ID: <20231124163953.11253-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="36143"; 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 17:41:31 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 1r6ZFC-0009CT-RL for guile-bugs@m.gmane-mx.org; Fri, 24 Nov 2023 17:41:30 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r6ZEi-0003tf-CY; Fri, 24 Nov 2023 11:41:00 -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 1r6ZEg-0003sa-8k for bug-guile@gnu.org; Fri, 24 Nov 2023 11:40: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 1r6ZEf-0007sV-VE for bug-guile@gnu.org; Fri, 24 Nov 2023 11:40:58 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r6ZEk-0001ID-9e for bug-guile@gnu.org; Fri, 24 Nov 2023 11:41: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 16:41: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.17008440154891 (code B ref 67412); Fri, 24 Nov 2023 16:41:02 +0000 Original-Received: (at 67412) by debbugs.gnu.org; 24 Nov 2023 16:40:15 +0000 Original-Received: from localhost ([127.0.0.1]:37050 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6ZDy-0001Gp-U3 for submit@debbugs.gnu.org; Fri, 24 Nov 2023 11:40:15 -0500 Original-Received: from mail-qt1-x82e.google.com ([2607:f8b0:4864:20::82e]:47348) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6ZDu-0001GV-5G for 67412@debbugs.gnu.org; Fri, 24 Nov 2023 11:40:13 -0500 Original-Received: by mail-qt1-x82e.google.com with SMTP id d75a77b69052e-41cc537ed54so10525061cf.2 for <67412@debbugs.gnu.org>; Fri, 24 Nov 2023 08:40:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700843999; x=1701448799; 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=fzvY7iy61nkb4rEix1zEA+uvhdgDXM9vIPFoKrp3fD0=; b=WXPM3j2w62HpoXXI/b1D4HaaUMW6FbGJsf1ZFAtTucFHzAqvMPouf3hEk4ODdyupgu NY8+HyBDhXwKecb7dkGbFvcsB0IkIwvegcvc/N6PWXWuQefUr7GaRqavJF4rxvGRMd2w zeWtjxBBqDHwAlKl9MhppNEySGKJxAidpBgu24/FSxGE5fA0YrWx0bC6OnsimYNkRvSw hndrKpDk29/McCtRySQ3y9qIfWrI+5Tfo0W9ICu/qghgfljdPenKqD4NtMzOdE6xjHJ/ Ak9ReA3uIYMEv5cFsxDuQQXSq3+yYqRDmHVUozDcqdUXOqlegpaMU2aYvpDGlkG70fLr Waeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700843999; x=1701448799; 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=fzvY7iy61nkb4rEix1zEA+uvhdgDXM9vIPFoKrp3fD0=; b=b0BHpwlElBjQHT+hrYDbd0ALdNsDTG1/7Ic+YgeYfkWV9205uDY3oWfZ7ZuiPy6iMi 6P81i5pZ+fAGCTV+bXK0SmdzXBgSFDuZom1orprpJMWbjlrdkFa1qZdF/7LMJFe81/Sp 3v4rTeAefXcUh+te1xCIEQmp+qKEGevyQViafE9lv+D2DaSMXZKjW07Z5LGM/EU/pqJm f8YGM7vc3ximDDKGY1jPEPfdfkTNW0yLQtxq2pTqrmXukfCaH0G/8S3c5FUo7Q+yQbva EV3lrJkj//FQZ6Pb2PrUe0tA8kR+1TORQm+n9aEfZJdxNY9UWzkbp9OmXnt5/7vo45jL 3lXw== X-Gm-Message-State: AOJu0YzyVc/v7bO5LKWHISJ5jU1EBHciamBicOpivcpJiJASwG4sm8Ct zvUqfENel1zifB+778aaqL8JwSwt0tg= X-Google-Smtp-Source: AGHT+IF0Q+pr4BnHjWrFBdyjF/aKv3az/iwQFFlM4H9mCdZWOBOgN0dqkoCrLYGcIguMZMM/hCa7Ew== X-Received: by 2002:a05:622a:1316:b0:423:83ee:749c with SMTP id v22-20020a05622a131600b0042383ee749cmr4327895qtk.57.1700843999386; Fri, 24 Nov 2023 08:39:59 -0800 (PST) Original-Received: from localhost.localdomain (dsl-158-42.b2b2c.ca. [66.158.158.42]) by smtp.gmail.com with ESMTPSA id ay30-20020a05622a229e00b00423a0d10d4csm128885qtb.62.2023.11.24.08.39.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 08:39:58 -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:10719 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 . --- 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))))))) base-commit: d579848cb5d65440af5afd9c8968628665554c22 -- 2.41.0