From: Tomas Volf <~@wolfsden.cz>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 74385@debbugs.gnu.org, Janneke Nieuwenhuizen <janneke@gnu.org>
Subject: bug#74385: [PATCH 3/4] srfi-64: Export define-equality-test.
Date: Fri, 13 Dec 2024 17:16:47 +0100 [thread overview]
Message-ID: <87y10jlfrk.fsf@wolfsden.cz> (raw)
In-Reply-To: <87jzc8n63o.fsf@gnu.org> ("Ludovic Courtès"'s message of "Mon, 09 Dec 2024 18:01:15 +0100")
[-- Attachment #1: Type: text/plain, Size: 2098 bytes --]
Ludovic Courtès <ludo@gnu.org> writes:
> Hi Tomas,
>
> Tomas Volf <~@wolfsden.cz> skribis:
>
>> +(define-syntax define-equality-test
>> (syntax-rules ()
>> ((_ name test-proc)
>> (define-syntax name
>> (λ (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 usage as
>> +@code{test-eq} but using @var{proc} instead of @code{eq?}.
>
> I didn’t notice earlier, but you can add docstrings like this:
>
> (define-syntax define-equality-test
> (syntax-rules ()
> "This is the docstring."
> …))
Ah, good catch. Since that works just for syntax-rules and not
syntax-case, I probably did not moved the documentation string around
when switching between them. Will update.
>
> As for exporting ‘define-equality-test’, I would clearly mark it as a
> “GNU extension”.
>
> 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.
I personally think that leaving it in one module is fine, and I agree it
should be documented. There are other GNU extensions already in the new
SRFI-64, and I plan to document all once #71300 is merged. I will wait
for v2 until that happens and will include the documentation changes
required.
Have a nice day,
Tomas
--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 853 bytes --]
next prev parent reply other threads:[~2024-12-13 16:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-16 17:39 bug#74385: [PATCH 0/4] Patches for SRFI-64 Tomas Volf
2024-11-16 17:42 ` bug#74385: [PATCH 1/4] srfi-64: Fix maybe-print-prop Tomas Volf
2024-11-16 17:42 ` bug#74385: [PATCH 2/4] srfi-64: Use ~s when printing some properties Tomas Volf
2024-11-16 17:42 ` bug#74385: [PATCH 3/4] srfi-64: Export define-equality-test Tomas Volf
2024-12-09 17:01 ` Ludovic Courtès
2024-12-13 16:16 ` Tomas Volf [this message]
2024-11-16 17:42 ` bug#74385: [PATCH 4/4] srfi-64: Report failed tests in (standards)Errors format Tomas Volf
2024-12-09 17:02 ` Ludovic Courtès
2024-12-13 16:05 ` Tomas Volf
2024-12-09 17:04 ` bug#74385: [PATCH 1/4] srfi-64: Fix maybe-print-prop Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y10jlfrk.fsf@wolfsden.cz \
--to=~@wolfsden.cz \
--cc=74385@debbugs.gnu.org \
--cc=janneke@gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).