This commit is contained in:
Vitor Santos Costa 2016-08-05 16:37:02 -05:00
parent fdfefbbd46
commit 0f19d518f2

View File

@ -63,8 +63,8 @@ listing :-
Mod \= prolog,
Mod \= system,
\+ '$hidden_atom'( Mod ),
'$current_predicate'(_,Mod,Pred, user),
'$undefined'(Pred, prolog), % skip predicates exported from prolog.
current_predicate( Name, Mod:Pred ),
\+ '$undefined'(Pred, Mod), % skip predicates exported from prolog.
functor(Pred,Name,Arity),
'$listing'(Name,Arity,Mod,Stream),
fail.
@ -108,7 +108,9 @@ listing(Stream, [MV|MVs]) :- !,
).
'$do_listing'(Stream, M, Name/Arity) :-
( current_predicate(M:Name/Arity),
( current_predicate(Name, M:Pred),
functor( Pred, Name, Arity),
\+ '$undefined'(Pred, M),
'$listing'(Name,Arity,M,Stream),
fail
;