[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] Chicken 4 syntax-rules bug
From: |
Jim Ursetto |
Subject: |
[Chicken-users] Chicken 4 syntax-rules bug |
Date: |
Thu, 5 Mar 2009 12:28:26 -0600 |
I believe this is a bug in Chicken 4. It works in Chicken 3 with the
syntax-case egg, and in Scheme 48. It looks like an ellipsis form
matches after just checking the first pattern, without checking
subsequent patterns.
(define-syntax foo
(syntax-rules () ((_ (a b) ...)
(list '(a b) ...))
((_ a ...)
(list '(a) ...))))
Chicken 4, native syntax-rules
#;2> (foo (1 2) (3 4) (5 6))
((1 2) (3 4) (5 6))
#;3> (foo (1 2) (3) (5 6))
Error: (car) during expansion of (foo ...) - bad argument type: ()
Chicken 3 w/ syntax-case egg, and Scheme 48:
#;2> (foo (1 2) (3 4) (5 6))
((1 2) (3 4) (5 6))
#;3> (foo (1 2) (3) (5 6))
(((1 2)) ((3)) ((5 6)))
- [Chicken-users] Chicken 4 syntax-rules bug,
Jim Ursetto <=