diff --git a/pl/modules.yap b/pl/modules.yap index ec73a7bd8..b255f2f38 100644 --- a/pl/modules.yap +++ b/pl/modules.yap @@ -94,7 +94,7 @@ module(N) :- Arity2 is Arity+2, '$process_exports'(Exports,Mod,ExportedPreds). '$process_exports'([op(Prio,Assoc,Name)|Exports],Mod,ExportedPreds) :- !, - op(Prio,Assoc,Name), + op(Prio,Assoc,prolog:Name), '$process_exports'(Exports,Mod,ExportedPreds). '$process_exports'([Trash|_],Mod,_) :- '$do_error'(type_error(predicate_indicator,Trash),module(Mod,[Trash])). diff --git a/pl/utils.yap b/pl/utils.yap index 8a3544523..e4f1df955 100644 --- a/pl/utils.yap +++ b/pl/utils.yap @@ -95,6 +95,10 @@ op(P,T,V) :- '$op2'(P, T, A), '$opl'(P, T, As). +'$op2'(P,T,A) :- + atom(A), + prolog_load_context(module, Mod), Mod \= user, !, + '$opdec'(P,T,A,Mod). '$op2'(P,T,A) :- atom(A), !, '$opdec'(P,T,A,prolog).