unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* bug#66057: (ice-9 match) allows invalid usages of ... or ..1
@ 2023-09-17 18:17 Maxim Cournoyer
  2023-09-17 18:36 ` Jean Abou Samra
  0 siblings, 1 reply; 4+ messages in thread
From: Maxim Cournoyer @ 2023-09-17 18:17 UTC (permalink / raw)
  To: 66057

Hi,

After attempting the following:

--8<---------------cut here---------------start------------->8---
(match (string-split "./Bootloaders/Printer/Documentation/html" #\/)
                                 (("." path ..1 "Documentation" "html")
                                  (pk 'path path)))

=> ;;; (path "Bootloaders")

Expected (and works with '...'): 
;;; (path "Bootloaders" "Printer")
--8<---------------cut here---------------end--------------->8---

and asking about it in #scheme or #guile, it seems the '..1' and '...'
patterns *must* be used strictly to match at the end of lists, but this
isn't explicitly mentioned in the manual, and even works for ... but not
for ..1, which is inconsistent/econfusing.

It was suggested by Zipheir in #scheme that Guile should return a syntax
error when ..1 or ... are used somewhere else than at the end of a list.
It seems a good suggestion.

-- 
Thanks,
Maxim





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-09-18  9:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-17 18:17 bug#66057: (ice-9 match) allows invalid usages of ... or ..1 Maxim Cournoyer
2023-09-17 18:36 ` Jean Abou Samra
2023-09-18  0:59   ` Maxim Cournoyer
2023-09-18  9:28     ` Jean Abou Samra

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