From 9d5a4eaf5c58b41731d4e8137ee91a805a4fbd49 Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Sat, 27 Jan 2018 18:03:41 -0500 Subject: [PATCH] Working through macro issues with and --- match-test.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/match-test.scm b/match-test.scm index 8939ce1d..9ce57329 100644 --- a/match-test.scm +++ b/match-test.scm @@ -51,8 +51,9 @@ ;; Following two are broken when using "and" but if we replace "and" with "my-and" in ;; the lib's match-two macro and recompile, the following both work here with "my-and". ;; Something funny going on here... - (match-one "test" (and s) ("test" (set! "test")) (match-drop-ids (begin s)) (failure) ()) +; (match-one "test" (and s) ("test" (set! "test")) (match-drop-ids (begin s)) (failure) ()) ; (match 1 ((and x) x)) + (match-two 1 (and x) (1 (set! 1)) (match-drop-ids (begin . x)) (begin) ()) ; (match-two "test" ((? string? s) s) ("test" (set! "test")) (match-drop-ids (begin . s)) (begin) ()) ;; I think there is some kind of interaction going on here with the "and" macro, where it