Opened 9 years ago
Last modified 2 years ago
#1351 new defect
syntax-rules has difficulty handling ellipsis in some cases? — at Initial Version
| Reported by: | sjamaan | Owned by: | sjamaan |
|---|---|---|---|
| Priority: | not urgent at all | Milestone: | someday |
| Component: | expander | Version: | 5.0.0 |
| Keywords: | syntax-rules | Cc: | |
| Estimated difficulty: | easy |
Description
As reported by Sascha Ziemann, this macro application fails while it ought to succeed:
(define-syntax define-facts
(syntax-rules ()
((_ (name a0 a1 ...) ((v00 v01 ...) (v10 v11 ...) ...))
'(define (name a0 a1 ...)
(conde
((== a0 v00) (== a1 v01) ...)
((== a0 v10) (== a1 v11) ...)
...)))))
The failing application:
(define-facts (fathero f c)
(("Abraham" "Ismael")
("Abraham" "Isaac")
("Isaac" "Jacob")
("Jacob" "Benjamin")))
A few other Schemes have difficulty with it, notably Chibi and Gambit. Gauche, Racket and Guile work fine.
Note: See
TracTickets for help on using
tickets.
