stop applying (=..)/2 to variables in tabling/trie.pl
% For a term of the form p(a,q(b)), "returns" functor_data(p,2) and [a,q(b)].
% p_trie_arity_univ(+Term,-FunctorData,-ArgumentsList).
p_trie_arity_univ(Term,functor_data(Name,Arity),Arguments) :-
- Term =.. [Name|Arguments],
- functor(Term,_,Arity).
+ ( var(Term) ->
+ Name = var,
+ Arity = 0,
+ Arguments = []
+ ; Term =.. [Name|Arguments],
+ functor(Term,_,Arity)
+ ).
% Returns a new empty trie.
trie_new(Trie) :-
