From fdfefbbd464733fc9c6342875b33d7cfa3b52c51 Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Fri, 5 Aug 2016 16:36:48 -0500 Subject: [PATCH] curried, what else? --- pl/preds.yap | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/pl/preds.yap b/pl/preds.yap index 51f6a63d9..2b7ccc511 100644 --- a/pl/preds.yap +++ b/pl/preds.yap @@ -600,10 +600,12 @@ Defines the relation: _P_ is a currently defined predicate whose name is the at */ current_predicate(A,T0) :- '$yap_strip_module'(T0, M, T), + (nonvar(T) -> functor(T, A, _) ; true ), ( '$current_predicate'(A,M, T, user) ; - '$imported_predicate'(A, T, M, T1, M1), + '$imported_predicate'(T, M, T1, M1), + functor(T1, A, _), \+ '$is_system_predicate'(T1,M1) ). @@ -712,12 +714,6 @@ current_predicate(F0) :- N is N2-2 ). -'$imported_predicate'(A, G, ImportingMod, G, Flags) :- - '$get_undefined_pred'(G, ImportingMod, G0, ExportingMod), - '$pred_exists'(G0, ExportingMod), - '$predicate_flags'(G0, ExportingMod, Flags, Flags), - functor(G, A, _Arity). - /** @pred current_key(? _A_,? _K_)