ECLiPSe provides a general mechanism to perform macro expansion
of Prolog terms.
Macro expansion can be performed in 3 situations:
Macros are attached to classes of terms specified by their functors
or by their type.
Macros obey the module system's visibility rules.
They may be either
The macro expansion is performed by a user-defined Prolog predicate.
- read macros
they are expanded just after a Prolog term has been read by the
ECLiPSe parser. Note that the parser is not only used during
comilation but by all
- compiler macros
they are expanded only during compilation and only when a term occurs
in a certain context (clause or goal).
- write macros
they are expanded just before a Prolog term is printed by one of the