Meta-Predicate Declarations

The fact that a predicate needs module name expansion is declared in a meta-predicate declaration:

     :- meta_predicate MetaPredSpec, ..., MetaPredSpec.
     

where each MetaPredSpec is a mode spec. E.g.:

     :- meta_predicate p(:, +).
     

which means that the first argument of p/2 shall be module name expanded. The arguments in the mode spec are interpreted as:

:
An integer
This argument, in any call to the declared predicate, shall be expanded. (Integers are allowed for compatibility reasons).
Anything else e.g. +, - or ?
This argument shall not be expanded

A number of built-in predicates have predefined meta-predicate declarations, as indicated by the mode specs in this manual, e.g. call(:Term).