From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Newsgroups: gmane.lisp.guile.bugs Subject: bug#74385: [PATCH 3/4] srfi-64: Export define-equality-test. Date: Mon, 09 Dec 2024 18:01:15 +0100 Message-ID: <87jzc8n63o.fsf@gnu.org> References: <20241116174210.9160-1-~@wolfsden.cz> <20241116174210.9160-3-~@wolfsden.cz> 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="18676"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 74385@debbugs.gnu.org, Janneke Nieuwenhuizen To: Tomas Volf <~@wolfsden.cz> Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Mon Dec 09 18:02:46 2024 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 1tKh9i-0004hW-6f for guile-bugs@m.gmane-mx.org; Mon, 09 Dec 2024 18:02:46 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tKh9W-0003eI-Hm; Mon, 09 Dec 2024 12:02:35 -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 1tKh90-0003HO-VF for bug-guile@gnu.org; Mon, 09 Dec 2024 12:02:04 -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 1tKh90-0008Vh-MK for bug-guile@gnu.org; Mon, 09 Dec 2024 12:02:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=e9VKFPo/gppIn4ejtCOZMrUvwWtOc050vKBYu2XqQBI=; b=AHd3F4GpoVX5eWIH/0cf6g38nkVUUmM4/Z9i4q2pZWXONJGFT4UHikw6An55hz1JVSsJJg/XoCmLmozlI3fd9g/0ieeg1SaEvZUJn7GVZkuqDILFbvAy37xIPlBt3eX6bTH7ubfPOKtYGuZS7Iii+kxyadewnDQI+UWWWoCD4LOScb2kuXo/4/pIprxbNxLXIuT7qzbujFYib5x/EwbsEWWgbb0q+/3Bd5PIJlrSe5TXvceB++oV2lKLsCkwe1SKGN+70bBOBEzpmQgPl0o+algtxL5xDgzhd7IuH1cQi/dBMS/dWtuuBSKA8rtG/DFL+rJFaG3SxvTsRz6Aw1ZnIA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tKh90-0008Iw-Bw for bug-guile@gnu.org; Mon, 09 Dec 2024 12:02:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Mon, 09 Dec 2024 17:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74385 X-GNU-PR-Package: guile X-GNU-PR-Keywords: patch Original-Received: via spool by 74385-submit@debbugs.gnu.org id=B74385.173376370431880 (code B ref 74385); Mon, 09 Dec 2024 17:02:02 +0000 Original-Received: (at 74385) by debbugs.gnu.org; 9 Dec 2024 17:01:44 +0000 Original-Received: from localhost ([127.0.0.1]:55378 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tKh8h-0008I7-R2 for submit@debbugs.gnu.org; Mon, 09 Dec 2024 12:01:44 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:54370) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tKh8d-0008Hi-R9 for 74385@debbugs.gnu.org; Mon, 09 Dec 2024 12:01:43 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tKh8T-0008JL-RS; Mon, 09 Dec 2024 12:01:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=e9VKFPo/gppIn4ejtCOZMrUvwWtOc050vKBYu2XqQBI=; b=cV5uE2es1nncDdL0+RM1 HhBiDcYWFzy/xN8zJ7Fnl0L27iG25p4oheS3yqJckHWysRZoAcT2GeV6WGyX9mgjN9mjbck16xWDw olbIR7/KYlbvZlnjTd8WF5Rt61bRQpIiVI40JidSJcE6MpeAb6m7hixM/H+JtZOOP0Wibnci8Hr9Y UR4Bvsdj+uJN5RwFl1gO0WmsLdf/LOyLCiUJaExyHCOMJu3KCIlfKbooSimgAlD4xf9VpFdOEmIad xx+Uge9Q7YWs32LNUCe5h6AQV0hZLqL2oIxwI/kuRSYOZlfrV93apuy/W9fS3tSsm/ilZpzzXWnUN kUzjU0RY8g82BQ==; In-Reply-To: <20241116174210.9160-3-~@wolfsden.cz> (Tomas Volf's message of "Sat, 16 Nov 2024 18:42:06 +0100") 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:11111 Archived-At: Hi Tomas, Tomas Volf <~@wolfsden.cz> skribis: > +(define-syntax define-equality-test > (syntax-rules () > ((_ name test-proc) > (define-syntax name > (=CE=BB (x) > (syntax-case x () > ((_ test-name expected test-expr) > - #`(%%test-2 #,x test-proc test-name expected test-expr)) > + #`(%test-2 #,x test-proc test-name expected test-expr)) > ((_ expected test-expr) > - #`(%%test-2 #,x test-proc #f expected test-expr))))))= )) > + #`(%test-2 #,x test-proc #f expected test-expr)))))))) > +(set-documentation! 'define-equality-test > + "@defspec define-equality-test identifier proc > +Define a new test form named @var{identifier} with same signature and us= age as > +@code{test-eq} but using @var{proc} instead of @code{eq?}. I didn=E2=80=99t notice earlier, but you can add docstrings like this: (define-syntax define-equality-test (syntax-rules () "This is the docstring." =E2=80=A6)) As for exporting =E2=80=98define-equality-test=E2=80=99, I would clearly ma= rk it as a =E2=80=9CGNU extension=E2=80=9D. The way this was done before is by having more exports in a separate module, like (srfi srfi-9 gnu). Whether or not you pick this approach, please make sure to document it in the manual and to prominently mark it as a GNU extension. Ludo=E2=80=99.