diff --git a/lib/chibi/match-test.sld b/lib/chibi/match-test.sld index 2ccd4d44..b40acd49 100644 --- a/lib/chibi/match-test.sld +++ b/lib/chibi/match-test.sld @@ -235,6 +235,8 @@ (match-letrec (((x y) (list 1 (lambda () (list a x)))) ((a b) (list 2 (lambda () (list x a))))) (append (y) (b)))) + (test "match-letrec quote" #t + (match-letrec (((x 'x) (list #t 'x))) x)) (cond-expand (chibi diff --git a/lib/chibi/match/match.scm b/lib/chibi/match/match.scm index 1821110b..a043a40a 100644 --- a/lib/chibi/match/match.scm +++ b/lib/chibi/match/match.scm @@ -1047,7 +1047,9 @@ ;; macros using syntax-rules" sent to comp.lang.scheme in Nov 2001. (define-syntax match-rewrite - (syntax-rules () + (syntax-rules (quote) + ((match-rewrite (quote x) ids (k ...)) + (k ... (quote x))) ((match-rewrite (p . q) ids k) (match-rewrite p ids (match-rewrite2 q ids (match-cons k)))) ((match-rewrite () ids (k ...))