Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] canonical camlp4-suffix?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Markus Mottl <markus@m...>
Subject: Re: [Caml-list] canonical camlp4-suffix?
On Mon, 03 Sep 2001, Patrick M Doane wrote:
> I'm curious - are you going to allow each file to be compiled with
> its own set of camlp4 preprocessors or will it be one set for the
> whole project?

It is always possible for users to provide specific 'make'-rules for
specific files, e.g. when they want to preprocess their OCaml-files in
funny ways. So I don't think it would be a good idea to make things this
complicated.

The main problem is that files containing quotations or syntax extensions
may themselves require preprocessing (e.g. the latter always need this).
It's impossible for 'make' to figure out how to proceed in the general
case. Therefore, I'll only support "first-order" preprocessing with
additional preprocessing flags as required for syntax extensions.

Furthermore, it would be also quite complicated if I supported
implementations of quotations / syntax extensions that spread over several
modules. This would require dependency analysis again. In such difficult
cases the user would be better advised to compile these extensions in
a separate directory and just pass the resulting library to camlp4 via
a flag variable.

I think this scheme should be good enough for most cases. Most people
won't require much more than a couple of quotation files, but don't want
to fiddle around with command line parameters.

Thus, there will only be one list containing all modules that implement
quotations or syntax extensions. They will be compiled before all other
modules and passed to the preprocessor during compilation of the source
files that use the extensions.

> I've seen .mlp sometimes...

Ok, '.mlp' and '.mlip' would be fine for me, too. Any objections?

Regards,
Markus Mottl

-- 
Markus Mottl                                             markus@oefai.at
Austrian Research Institute
for Artificial Intelligence                  http://www.oefai.at/~markus
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr