Go to the first, previous, next, last section, table of contents.


A simple pretty-printer for Ciao programs

Author(s): The CLIP Group.

Version: 1.10#6 (2004/8/7, 21:46:39 CEST)

Version of last change: 1.9#248 (2003/12/30, 21:52:0 CET)

This library module writes out to standard output a clause or a list of clauses.

Usage and interface (pretty_print)

Documentation on exports (pretty_print)

PREDICATE: pretty_print/2:

Usage: pretty_print(Cls, Flags)

PREDICATE: pretty_print/3:

Usage: pretty_print(Cls, Flags, Ds)

Documentation on internals (pretty_print)

REGTYPE: clauses/1:

A regular type, defined as follows:


clauses([]).
clauses([_1|_2]) :-
        clause(_1),
        clauses(_2).
clauses(_1) :-
        clause(_1).

REGTYPE: clause/1:

A regular type, defined as follows:


clause(_1) :-
        clterm(_1).
clause((_1,_2)) :-
        clterm(_1),
        term(_2).

REGTYPE: clterm/1:

A regular type, defined as follows:


clterm(clause(_1,_2)) :-
        callable(_1),
        body(_2).
clterm(directive(_1)) :-
        body(_1).
clterm((_1:-_2)) :-
        callable(_1),
        body(_2).
clterm(_1) :-
        callable(_1).

REGTYPE: body/1:

A well formed body, including cge expressions and &-concurrent expressions. The atomic goals may or may not have a key in the form ^(goal:any), and may or may not be module qualified, but if they are it has to be in the form ^(^(moddesc:goal):any).

Usage: body(X)

REGTYPE: flag/1:

A keyword ask/1 flags whether to output asks or whens and nl/1 whether to separate clauses with a blank line or not.

Usage: flag(X)


Go to the first, previous, next, last section, table of contents.