The predicates ::/2 and #::/2 can also be used to query the domain of a domain variable, however they yield a list of integer intervals, which is the direct domain representation (it is therefore also more efficient because no new structures have to be created).
Use this predicate with care, because it might expand a compact representation of large intervals into an explicit list of their elements. Unless an explicit list representation of the domain is really required, the predicates working on domains should be preferred.
[eclipse 9]: X::[1..3, 100..102], dom(X, List), X::I. List = [1, 2, 3, 100, 101, 102] X = X :: [1 .. 3, 100 .. 102] I = [1 .. 3, 100 .. 102] yes.