GNU bug report logs -
#60225
[PATCH] records: match-record supports specifying a different variable name.
Previous Next
Reported by: Attila Lendvai <attila <at> lendvai.name>
Date: Tue, 20 Dec 2022 17:42:02 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Attila Lendvai <attila <at> 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’.
This bug report was last modified 2 years and 147 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.