Previous Next Contents

2.2   Creating a quotation expander

A quotation expander is a function written in Objective Caml. A call to the Camlp4 library function ``Quotation.add'' (see section 6.5) adds the quotation expander. The variable ``Quotation.default'' holds the name of the default quotation.

The file holding the quotation expander must be compiled using the Objective Caml compiler, with the Camlp4 library directory in its directory path (option ``-I''). An object file (ending with ``.cmo'') is created, which is loadable in Camlp4 or in the Objective Caml toplevel using the directive ``#load''. The source can be loaded directly using the directive ``#use''.


Previous Next Contents