StackOverflowError when logic variable is unified with a set

Description

It is pretty common to unify a variable with a vector or list of a fixed length like (== q (list a b)) and then define more goals on a and b with the intention of being able to define the run* query's result format. However, if one does the same using a set one gets a StackOverflowError.

Example:

Basically, what I wanted to express here is that the order of a and b is not significant so that (distinct (run* ...)) gives me the unique results.

The backtrace is:

Environment

core.logic 0.8.10, Clojure 1.7.0

Assignee

David Nolen

Reporter

Tassilo Horn