My syntax extension for properties does that.
http://www.math.nagoya-u.ac.jp/~garrigue/code/ocaml.html

I haven't tested it recently but hopefully it still works.

Jacques Garrigue

2012/05/12 5:27 "Joel Reymont" <joelr1@gmail.com>:
I would like to auto-generate an object with a couple of mutable
fields and some methods.

I would then like to pretty-print the code into a file.

Are there any examples showing how to do this with camlp4?

   Thanks in advace, Joel

--------------------------------------------------------------------------
AlgoKit: EasyLanguage trading strategies, on the server, w/ Rithmic R|API
---------------------+------------+---------------------------------------
http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont
---------------------+------------+---------------------------------------

--
Caml-list mailing list.  Subscription management and archives:
https://sympa-roc.inria.fr/wws/info/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs