[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] two-dimensional syntax-rules

From: Sascha Ziemann
Subject: Re: [Chicken-users] two-dimensional syntax-rules
Date: Fri, 10 Mar 2017 11:10:35 +0100

2017-03-10 10:55 GMT+01:00 Peter Bex <address@hidden>:
> Gauche and Racket accept this macro application, Scheme48 rejects it (but
> that's expected, because our syntax-rules is originally from Scheme48).

But Gauche fails like Chibi. They silently ignore the last ellipsis.

$ chibi-scheme
> (define-syntax define-facts
  (syntax-rules ()
    ((_ (name a0 a1 ...) ((v00 v01 ...) (v10 v11 ...) ...))
     '(define (name a0 a1 ...)
          ((== a0 v00) (== a1 v01) ...)
          ((== a0 v10) (== a1 v11) ...)
> (define-facts (fathero f c)
  (("Abraham" "Ismael")
   ("Abraham" "Isaac")
   ("Isaac"   "Jacob")
   ("Jacob"   "Benjamin")))
(define (fathero f c) (conde ((== f "Abraham") (== c "Ismael")) ((== f
"Abraham") (== c "Isaac"))))

MIT and Ikarus succeed like Guile.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]