1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-10 05:50:26 +02:00

fix matches? test

* test-suite/tests/syntax.test (matches?): Unfortunately this relatively
  recent macro fails due to the underscore-in-literals-list prohibition.
  But, it seems I was in the minority wanting _ for a literal.
This commit is contained in:
Andy Wingo 2010-06-21 21:06:29 +02:00
parent b78d91d517
commit 31fe120216

View file

@ -139,14 +139,14 @@
(eval '(begin (if #t (begin)) #t) (interaction-environment))))
(define-syntax matches?
(syntax-rules (_)
(syntax-rules (<>)
((_ (op arg ...) pat) (let ((x (op arg ...)))
(matches? x pat)))
((_ x ()) (null? x))
((_ x (a . b)) (and (pair? x)
(matches? (car x) a)
(matches? (cdr x) b)))
((_ x _) #t)
((_ x <>) #t)
((_ x pat) (equal? x 'pat))))
(with-test-prefix "lambda"