bug#66057: (ice-9 match) allows invalid usages of ... or ..1
Jean Abou Samra <[email protected]>
| Newsgroups | gmane.lisp.guile.bugs |
|---|---|
| Message-ID | <[email protected]> |
Le dimanche 17 septembre 2023 à 20:59 -0400, Maxim Cournoyer a écrit : > It's mentioned in the Guile Reference manual; see info "(guile) Pattern > Matching": > > > > So your example is just binding the string "Printer" to the variable "..1": > > since "..1" doesn't have any special meaning, it's just a pattern variable. > > Unless I misread the doc, it should '..1' is a special case '...', which > means "one or more" instead of "zero or more". OK, my bad, I didn't know that. You're right that "..1" is mistreated here, it should be compiled as "one or more repetitions" but instead gets compiled as a pattern variable. That's a bug, indeed — I believe the expected behavior is that "..1" behaves like "...", namely being allowed in the middle of a list.
signature.asc
(application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQSZ7TKxnKGyBvBjzBmj8PYLiTOX/gUCZQgYPwAKCRCj8PYLiTOX /gtWAQCBvcw1rQYuORYQNEfRAFP0ci3jKLXtibDjQWfqIrKxaQEA6w76gF/2UM70 BmYuGamm2zdteQB5yI7maKV7xrAQagk= =6Nln -----END PGP SIGNATURE-----