From 59c2b31e3e1b2a8a978ebe35263a0fcd146b0d4e Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Fri, 26 Jan 2018 18:43:28 -0500 Subject: [PATCH] WIP --- match-test.scm | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/match-test.scm b/match-test.scm index c83d1440..8939ce1d 100644 --- a/match-test.scm +++ b/match-test.scm @@ -48,14 +48,13 @@ ; (match-one v (and s) ("test" (set! "test")) (match-drop-ids (begin s)) (failure) ()) ; (failure)))) -; (match-one "test" (and s) ("test" (set! "test")) (match-drop-ids (begin s)) (failure) ()) -; (match 1 ((my-and x) x)) +;; 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 1 ((and x) x)) ; (match-two "test" ((? string? s) s) ("test" (set! "test")) (match-drop-ids (begin . s)) (begin) ()) -(match-check-ellipsis - (and x) - 1 - 0) ;; I think there is some kind of interaction going on here with the "and" macro, where it ;; is being expanded even though it is part of the syntax-rules literals and should not be. ;; Just a guess, need to prove it, but it could explain why we fall into this case even though