Skip to content
Open
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/lib/format.pl
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,15 @@

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */

%% listing(+PI)
%
% Given a predicate indicator PI=Identifier/Arity, `listing(PI)` succeeds
% if there is a dynamic, user-defined procedure with the given identifier
% and arity and at least one clause. All clauses are written to output.
% Fails if there are no clauses or if the procedure is not defined.
% If PI specifies a procedure that is builtin or its implementation is
% otherwise not public, an error is thrown.

listing(PI) :-
nonvar(PI),
( PI = Name/Arity0 ->
Expand Down