newbie question about type error, fd_domains and gprolog



Given the following simple prolog code:
------ CUT ---------
needs(bob,[one,two]).
needs(bill,[three,four,one]).
provides(prod1,[three,four,one]).
provides(prod2,[one]).
provides(prod3,[two,four,three]).
provides(prod4,[one,two,three,four]).
contains([],_).
contains([M|N],Y) :- fd_domain(M, Y),fd_labeling(M),contains(N,Y).
%contains([M|N],Y):-member(M,Y),contains(N,Y).
whoprovides(X,Y):-provides(X,Z),member(Y,Z).
cangointo(X,Y):-needs(X,Z),provides(Y,Q),contains(Z,Q).
------ CUT ---------

I get a type error:

| ?- cangointo(X,Y).
uncaught exception: error(type_error(list,one),fd_domain/2)

Hoever, when I use the member/recursive version I get the expected:

| ?- cangointo(X,Y).

X = bob
Y = prod4 ? ;

X = bill
Y = prod1 ? ;

X = bill
Y = prod4 ? ;

I don't understand why this is happening and if anyone can help this newbie
get his head around this I would be hugely greatful. TIA.

-jbs
.