Permalink
Browse files

* src/main/clojure/clojure/core/logic.clj: remove another dubious pro…

…tocol IStorableConstraint
  • Loading branch information...
1 parent 615dcfa commit 870dcc4a97cb68d9c443441987b3ccc29147f0c2 David Nolen committed Aug 1, 2012
Showing with 9 additions and 8 deletions.
  1. +8 −7 src/main/clojure/clojure/core/logic.clj
  2. +1 −1 src/test/clojure/clojure/core/logic/tests.clj
@@ -125,9 +125,9 @@
IConstraintId
(id [this] nil))
-(defprotocol IStorableConstraint
- (with-proc [this proc])
- (proc [this]))
+;; (defprotocol IStorableConstraint
+;; (with-proc [this proc])
+;; (proc [this]))
(defprotocol IConstraintOp
(rator [this])
@@ -3123,9 +3123,10 @@
IConstraintId
(id [this] _id)
;; TODO: not super happy about the naming here
- IStorableConstraint
- (with-proc [this proc] (FDConstraint. proc _id _meta))
- (proc [this] proc))
+ ;; IStorableConstraint
+ ;; (with-proc [this proc] (FDConstraint. proc _id _meta))
+ ;; (proc [this] proc)
+ )
(defn fdc [proc]
(FDConstraint. proc nil nil))
@@ -3135,7 +3136,7 @@
cid (if-let [cid (id x)]
(str cid ":")
"")]
- (.write writer (str "(" cid (rator (proc x)) " " (apply str (interpose " " (rands (proc x)))) ")"))))
+ (.write writer (str "(" cid (rator (.proc x)) " " (apply str (interpose " " (rands (.proc x)))) ")"))))
(defmacro infd [& xs-and-dom]
(let [xs (butlast xs-and-dom)
@@ -2029,7 +2029,7 @@
n* (sorted-set 1 3 5)
c (with-id (fdc (-distinctfdc x #{y} (conj n* 7))) 1)]
(is (= (id c) 1))
- (is (= (id (proc c)) 1))))
+ (is (= (id (.proc c)) 1))))
(deftest test-distinctfd
(is (= (run* [q]

0 comments on commit 870dcc4

Please sign in to comment.