From 50ed37f52e3e863dc3708e09d6306946d1e198b6 Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Mon, 19 May 2014 20:15:05 -0400 Subject: [PATCH] gestalt-intersect is probably not useful as an API --- minimart/core.rkt | 2 +- minimart/examples/example-lang.rkt | 2 +- minimart/examples/example-plain.rkt | 2 +- minimart/gestalt.rkt | 5 ----- 4 files changed, 3 insertions(+), 8 deletions(-) diff --git a/minimart/core.rkt b/minimart/core.rkt index 29ebda4..dc9e3bc 100644 --- a/minimart/core.rkt +++ b/minimart/core.rkt @@ -25,7 +25,7 @@ pub gestalt-empty gestalt-union - gestalt-intersect + gestalt-filter gestalt-empty? gestalt-ref compile-gestalt-projection diff --git a/minimart/examples/example-lang.rkt b/minimart/examples/example-lang.rkt index ec77f43..38dd799 100644 --- a/minimart/examples/example-lang.rkt +++ b/minimart/examples/example-lang.rkt @@ -34,7 +34,7 @@ (printf "REF:") (pretty-print-matcher (gestalt-ref g 0 0 #f) #:indent 4) (printf "INTERSECTED:\n") - (pretty-print-gestalt (gestalt-intersect g (sub (set-timer ? ? ?)))) + (pretty-print-gestalt (gestalt-filter g (pub (set-timer ? ? ?) #:level 1))) #f] [(message (timer-expired 'tick now) _ _) (printf "TICK ~v\n" now) diff --git a/minimart/examples/example-plain.rkt b/minimart/examples/example-plain.rkt index ff76989..7a38ff3 100644 --- a/minimart/examples/example-plain.rkt +++ b/minimart/examples/example-plain.rkt @@ -30,7 +30,7 @@ (printf "REF:") (pretty-print-matcher (gestalt-ref g 0 0 #f) #:indent 4) (printf "INTERSECTED:\n") - (pretty-print-gestalt (gestalt-intersect g (sub (set-timer ? ? ?)))) + (pretty-print-gestalt (gestalt-filter g (pub (set-timer ? ? ?) #:level 1))) #f] [(message (timer-expired 'tick now) _ _) (printf "TICK ~v\n" now) diff --git a/minimart/gestalt.rkt b/minimart/gestalt.rkt index ff966c2..2cf76d9 100644 --- a/minimart/gestalt.rkt +++ b/minimart/gestalt.rkt @@ -20,7 +20,6 @@ gestalt-combine-straight gestalt-combine-crossed gestalt-union - gestalt-intersect gestalt-filter gestalt-match strip-gestalt-label @@ -141,10 +140,6 @@ [(list g) g] [(cons g rest) (gestalt-union1 g (walk rest))])))) -(define (gestalt-intersect g1 g2) (gestalt-combine-straight g1 g2 - (lambda (side x) '()) - matcher-intersect)) - ;; View on g1 from g2's perspective. ;; Drops a level from g2 and intersects crossed. (define (gestalt-filter g1 g2)