From 48053694c725bfc13557528cec5f7ac87b4a68de Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Thu, 9 Oct 2014 10:46:09 +0100 Subject: [PATCH] document abolish and make sure that assert(m:(H:-B)) treats m as source module. --- pl/preds.yap | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pl/preds.yap b/pl/preds.yap index c47efdea4..f498e1cfe 100644 --- a/pl/preds.yap +++ b/pl/preds.yap @@ -711,10 +711,10 @@ retractall(V) :- /** @pred abolish(+ _P_,+ _N_) -Deletes the predicate with name _P_ and arity _N_. It will remove -both static and dynamic predicates. - - +Completely delete the predicate with name _P_ and arity _N_. It will +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'(N,A,Mod). @@ -934,8 +934,8 @@ dynamic_predicate(P,Sem) :- '$expand_clause'((H:-B),C1,C2,Mod,HM) :- !, strip_module(Mod:H, HM, H1), - '$current_module'(M), - '$module_expansion'((H1:-B), C1, C2, HM, M, M), + % Mod has scope over the full clause + '$module_expansion'((H1:-B), C1, C2, HM, Mod, Mod), ( get_value('$strict_iso',on) -> '$check_iso_strict_clause'(C1) ;