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: Tue, 27 Dec 2022 23:53:11 +0100 [thread overview]
Message-ID: <87sfh0a27c.fsf_-_@gnu.org> (raw)
In-Reply-To: <20221222021455.18632-2-attila@lendvai.name> (Attila Lendvai's message of "Wed, 21 Dec 2022 23:14:57 -0300")
Attila Lendvai <attila@lendvai.name> skribis:
> * tests/records.scm ("match-record, syntactic interference"): New failing test.
> ---
>
> i'm not sure what's going on here, but it looks like a bug to me.
[...]
> + (let (,@bindings) ; but here it does interfere
> + (match-record (foo (second 2)) <foo>
> + (first second)
> + (list first second))))))
This has to do with how macro “literals” are matched (info "(guile)
Syntax Rules"):
A literal matches an input expression if the input expression is an
identifier with the same name as the literal, and both are unbound(1).
Although literals can be unbound, usually they are bound to allow
them to be imported, exported, and renamed. *Note Modules::, for more
information on imports and exports. In Guile there are a few standard
auxiliary syntax definitions, as specified by R6RS and R7RS:
In the example above, the ‘let’ binding for ‘second’ was shadowing the
other ‘second’.
(I think this was recently discussed on guix-devel or something.)
Ludo’.
next prev parent reply other threads:[~2022-12-27 22:54 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
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 ` Ludovic Courtès [this message]
2022-12-27 22:49 ` bug#60225: [PATCH] records: match-record supports specifying a different variable name 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sfh0a27c.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 external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.