Permalink
Browse files

CLJS-145: partial map bug

make featurec more relation, feature map no longer need be
ground. Cleanup featurec reification a bit. Needed to walk the value in
the other map in unify-with-pmap*. Add test
  • Loading branch information...
1 parent e3794ee commit 737452044d8feeebd908b6fb0cfb12f3370b58f3 @swannodette swannodette committed Nov 26, 2013
Showing with 3 additions and 2 deletions.
  1. +2 −1 src/main/clojure/clojure/core/logic.clj
  2. +1 −1 src/test/clojure/clojure/core/logic/tests.clj
@@ -2427,7 +2427,8 @@
vf (get v kf ::not-found)]
(if (= vf ::not-found)
nil
- (let [uf (get u kf)]
+ (let [uf (get u kf)
+ vf (walk s vf)]
(if (lvar? vf)
(recur (next ks) ((featurec vf uf) s))
(if (map? uf)
@@ -1820,7 +1820,7 @@
(is (= (run* [x y]
(== y {:baz "woz"})
(== (partial-map {:foo x}) {:foo y}))
- '(([_0 {:baz "woz"}] :- (clojure.core.logic/featurec {:baz "woz"} _0))))))
+ '([{:baz "woz"} {:baz "woz"}]))))
;; =============================================================================
;; cKanren

0 comments on commit 7374520

Please sign in to comment.