On Mon, Dec 15, 2008 at 03:24:47PM +0000, Richard Jones wrote:
> On Mon, Dec 15, 2008 at 09:04:34AM -0500, Jacques Carette wrote:
> > Question: is there a way to use a camlp4 extension *inside* the 
> > definition of another?
> > 
> > AFAIK, extensions are not ordered, so trying to use camlp4 to deal with 
> > IFDEF in the source of a syntax extension (like pa_monad) to switch 
> > between 3.10 and 3.11 [to deal with the new private and lazy features] 
> > does not seem possible.  Or have I missed something?
> 
> camlp4 extensions should be composable (as long as they don't actually
> conflict with each other).  Just list several *.cmo files on the
> camlp4 command line.  What happened when you tried it?

I believe he's not referring to simultaneous use of pa_monad and another
extension in user code, but of Camlp4MacroParser *in* the sources of pa_monad.
Since pa_monad is build with

  ocamlc -I +camlp4 -pp camlp4orf -c pa_monad.ml

changing that to 

  ocamlc -I +camlp4 -pp "camlp4orf Camlp4MacroParser.cmo" -c pa_monad.ml

might work.

-- 
Mauricio Fernandez  -   http://eigenclass.org

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Reply via email to