
:- multifile user:term_expansion/2.
:- dynamic user:term_expansion/2.

% for use from inside modules (where you say  "user:qtest :- .....")
user:term_expansion((user:qtest :- Body), (user:qtest(anon(Symbol)) :- Body)) :-
        gensym(qtest, Symbol).

user:term_expansion((qtest :- Body), (qtest(anon(Symbol)) :- Body)) :-
        gensym(qtest, Symbol).


:- dynamic(qtest/1).
:- multifile(qtest/1).
