ADDED: library(format) now provides a rudimentary version of listing/1
ADDED: library(format) now provides a rudimentary version of listing/1

Example:

    :- dynamic(a/1).

    a(X) :- X = true, b(X).

Yielding:

    ?- listing(a/1).
    %@ a(A) :-
    %@    A=true,
    %@    b(A).
    %@    true.

listing/1 only works for predicates and DCGs that are declared dynamic/1.

mthom/rusty-wam