fix undefined error in the absence of tabling (obs from Paulo Moura).

This commit is contained in:
Vitor Santos Costa 2010-01-31 23:13:30 +00:00
parent 6b0136b836
commit eea6932e23

View File

@ -47,6 +47,10 @@ table(Pred) :-
'$do_table'(Mod,Pred) :-
'$do_error'(type_error(callable,Mod:Pred),table(Mod:Pred)).
'$set_table'(Mod,PredFunctor) :-
'$undefined'('$c_table'(_,_),prolog), !,
functor(PredFunctor, PredName, PredArity),
'$do_error'(resource_error(tabling,Mod:PredName/PredArity),table(Mod:PredName/PredArity)).
'$set_table'(Mod,PredFunctor) :-
'$undefined'(PredFunctor,Mod), !,
'$c_table'(Mod,PredFunctor).