document abolish and make sure that assert(m:(H:-B)) treats m as source
module.
This commit is contained in:
parent
ed6f7f8573
commit
48053694c7
12
pl/preds.yap
12
pl/preds.yap
|
@ -711,10 +711,10 @@ retractall(V) :-
|
||||||
|
|
||||||
/** @pred abolish(+ _P_,+ _N_)
|
/** @pred abolish(+ _P_,+ _N_)
|
||||||
|
|
||||||
Deletes the predicate with name _P_ and arity _N_. It will remove
|
Completely delete the predicate with name _P_ and arity _N_. It will
|
||||||
both static and dynamic predicates.
|
remove both static and dynamic predicates. All state on the predicate,
|
||||||
|
including whether it is dynamic or static, multifile, or
|
||||||
|
meta-predicate, will be lost.
|
||||||
*/
|
*/
|
||||||
abolish(Mod:N,A) :- !,
|
abolish(Mod:N,A) :- !,
|
||||||
'$abolish'(N,A,Mod).
|
'$abolish'(N,A,Mod).
|
||||||
|
@ -934,8 +934,8 @@ dynamic_predicate(P,Sem) :-
|
||||||
|
|
||||||
'$expand_clause'((H:-B),C1,C2,Mod,HM) :- !,
|
'$expand_clause'((H:-B),C1,C2,Mod,HM) :- !,
|
||||||
strip_module(Mod:H, HM, H1),
|
strip_module(Mod:H, HM, H1),
|
||||||
'$current_module'(M),
|
% Mod has scope over the full clause
|
||||||
'$module_expansion'((H1:-B), C1, C2, HM, M, M),
|
'$module_expansion'((H1:-B), C1, C2, HM, Mod, Mod),
|
||||||
( get_value('$strict_iso',on) ->
|
( get_value('$strict_iso',on) ->
|
||||||
'$check_iso_strict_clause'(C1)
|
'$check_iso_strict_clause'(C1)
|
||||||
;
|
;
|
||||||
|
|
Reference in New Issue