Comment made by: joeosborn
Same exception with this test case in HEAD (sorry for all the facts):
`
(defrel thing- [Thing])
(defrel type- [Thing] [Type])
(fact thing- [0])
(fact thing- [1])
(fact thing- [2])
(fact type- [0] [:player])
(fact type- [1] [:dragon])
(fact type- [2] [:pig])
(defn type-enum [t] [:type t])
(defna drawable- [Key]
([[Thing]] (thing- [Thing]) (fresh [Type] (type- [Thing] [Type]) (drawable- [Type])))
([[(type-enum :player)]] succeed)
([[(type-enum :dragon)]] succeed))
(deftest do-fns-work
(is (= (run* [q] (drawable- [q])) '(0 1))))
`
Now that I look at it, I may be expecting a wrong-format return value, but the point is that I don't even get that far.
Using the REPL, I checked out how (defna drawable- . . .) expands (tidied up slightly):
`
(def drawable- (clojure.core/fn ([Key]
(clojure.core.logic/conda
((clojure.core.logic/fresh [Thing] (clojure.core.logic/== [Thing] Key) (thing- [Thing]) (fresh [Type] (type- [Thing] [Type]) (drawable- [Type]))))
((clojure.core.logic/fresh [type-enum]
(clojure.core.logic/== [(type-enum :player)] Key) succeed))
((clojure.core.logic/fresh [type-enum]
(clojure.core.logic/== [(type-enum :dragon)] Key) succeed))))))
`
Note the (clojure.core.logic/fresh (link: type-enum) . . .) forms, which are exactly what I would not want to see in this case.
I'm not really sure why this doesn't work here yet works for the matche test case.