Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Quotations and the functorial camlp4 interface
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2010-08-30 (14:18)
From: Hendrik Tews <tews@o...>
Subject: Re: [Caml-list] Quotations and the functorial camlp4 interface
I wrote:

   More in detail: Assume I obtained two camlp4 syntax modules SO
   and SR, such that SO parses the orginal syntax and SR parses the
   revised syntax. I now want to add quotation support to both SO
   and SR. Following Camlp4OCamlRevisedQuotationExpander I do

There is one point that I found out myself in the meantime:
quotations are installed by mutating something inside the
Quotation submodule of a Camlp4Syntax. Further, the functor that
creates emoty syntaxes, OCamlInitSyntax, uses its Quotation
argument literally as Quotation submodule in its output.
Therefore, when creating the modules SO and SR it is important to
do so with freshly generated quotations modules (by

How about the Loc submodule of Ast that is passed into
OCamlInitSyntax? There is the mutable, which contains
the default location variable. If I reuse the Ast argument of
OCamlInitSyntax, will the mutable be shared between the
outputs? Are there syntax extensions in the camlp4 distribution
that mutate