Details
-
Type:
Defect
-
Status:
Resolved
-
Priority:
Blocker
-
Resolution: Completed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:
-
Environment:0.7.5 or 0.8-alpha
Description
(defrecord Test [a b])
(run* [q]
(== q (->Test 1 2 )))
;; ({:a 1, :b 2})
;; Where's my record?
Records are IPersistentMaps. core.logic doesn't know anything about your custom type so it returns the type it knows how to unify.
If you want core.logic to work with your record you need to implement the unification protocols for you record. But of course that's a little tedious if you have many different records.
Open to better ideas. The relevant code where this unexpected behavior occurs is the implementation of IWalkTerm for the core Clojure data types.