From 5d2cb21d29a0805dc73182d9498351655c43e8bc Mon Sep 17 00:00:00 2001 From: Sam Caldwell Date: Sun, 28 Feb 2016 21:47:54 -0500 Subject: [PATCH] Use finer-grained projections inside trie comprehensions Fixes HEAD~2 --- prospect/comprehensions.rkt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/prospect/comprehensions.rkt b/prospect/comprehensions.rkt index 46f1183..140bd54 100644 --- a/prospect/comprehensions.rkt +++ b/prospect/comprehensions.rkt @@ -19,14 +19,14 @@ (match-define (list temp1 temp2) (generate-temporaries #'(tmp1 tmp2))) (define-values (proj-stx pat match-pat bindings) (analyze-pattern outer-stx pat-stx)) - (list temp1 temp2 pat match-pat))) + (list temp1 temp2 proj-stx bindings))) ;; trie projection symbol -> (U set exn:fail?) ;; tries to project the trie. If the resulting trie would be infinite, raise an ;; error, using the third argument to describe the pattern being projected. ;; If the resulting trie is finite, return it as a set. (define (project-finite t proj pat) - (define s? (trie-project/set t (compile-projection (?! proj)))) + (define s? (trie-project/set t (compile-projection proj))) (unless s? (error "pattern projection created infinite trie:" pat)) s?) @@ -51,7 +51,7 @@ ...) ([loop-tmp (in-set #,set-tmp)]) (match loop-tmp - [(list #,match-pat) + [(list #,@match-pat) #,(build-fold #`(_ ([acc-id acc-id] ...)