unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Attila Lendvai <attila@lendvai.name>
Cc: 60225@debbugs.gnu.org
Subject: [bug#60225] [PATCH] records: match-record supports specifying a different variable name.
Date: Wed, 21 Dec 2022 23:15:57 +0100	[thread overview]
Message-ID: <871qos4d42.fsf@gnu.org> (raw)
In-Reply-To: <20221220174018.14433-1-attila@lendvai.name> (Attila Lendvai's message of "Tue, 20 Dec 2022 14:40:19 -0300")

Hi,

Attila Lendvai <attila@lendvai.name> skribis:

> An example:
>
> (match-record obj <my-type>
>   (field1 (field2 custom-var-name) field3)
>   ...)

Nice!  It looks like a useful extension to me.

> -      ((_ record type (field rest ...) body ...)
> -       #`(let-syntax ((field-offset (syntax-rules ()
> +      ((_ record type ((field-name variable-name) rest ...) body ...)
> +       #'(let-syntax ((field-offset (syntax-rules ()

I’d just drop ‘-name’, it’s all names anyway.  :-)

Could you also add a test in ‘tests/records.scm’ next to the others?

TIA,
Ludo’.




  reply	other threads:[~2022-12-21 22:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-20 17:40 [bug#60225] [PATCH] records: match-record supports specifying a different variable name Attila Lendvai
2022-12-21 22:15 ` Ludovic Courtès [this message]
2022-12-22  2:14 ` [bug#60225] [PATCH v2 1/2] " Attila Lendvai
2022-12-22  2:14   ` [bug#60225] [PATCH v2 2/2] tests: records: Add a failing test for match-record Attila Lendvai
2022-12-27 22:53     ` [bug#60225] [PATCH] records: match-record supports specifying a different variable name Ludovic Courtès
2022-12-27 22:49   ` bug#60225: " 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://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871qos4d42.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=60225@debbugs.gnu.org \
    --cc=attila@lendvai.name \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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).