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-09-03 (07:17)
From: Hendrik Tews <tews@o...>
Subject: Re: [Caml-list] Quotations and the functorial camlp4 interface
I wrote:

   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

Yes, it will, changing has a global effect. 

What's more problematic is that the Loc sources are not
functorized, that is, there is only one instance
(Camlp4.Struct.Loc) that one can use. Consequently, is a
kind of global Camlp4 reference, similar to
Camlp4_config.quotation and Camlp4_config.antiquotations.

   Are there syntax extensions in the camlp4 distribution
   that mutate

A grep for yields only one place that changes
the option -loc in So the answer is probably no.