Welcome! Please see the About page for a little more info on how this works.

0 votes
in core.logic by

`
(deftest test-tie-disequality
(is (= (run* [q]

       (nom/fresh [a b]
         (!= (nom/tie a a) 'hello)))
    '(_0)))

(is (= (run* [q]

       (nom/fresh [a b]
         (!= (nom/tie a a) (nom/tie b b))))
    ())))

`

Currently, the first causes an error, because IPersistentMap (which gets called because Tie is a record!) assumes that the the other term is also a record (that seems like a bug). If we revert the commit which makes Tie a record, this works.

The other one succeeds, when it should fail. This is regardless of whether Tie is a record or not.

2 Answers

0 votes
by

Comment made by: namin

quick fix in https://github.com/clojure/core.logic/commit/8af0f45f8d1cb515ec7a00e5acd751562a31bb37

for actually doing != modulo alpha equivalence requires the opposite of nom/hash.

0 votes
by
Reference: https://clojure.atlassian.net/browse/LOGIC-119 (reported by namin)
...