From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id q4C28XNQ027692 for ; Sat, 12 May 2012 04:08:33 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkIGAL/ErU/RVda2imdsb2JhbABEFqFBByyIKgGJMwgiAQEBCgkNBxIGI4IVAQEBAwESAiwBLQsBAwELAQUFBAcaISEBEgEFAQoSBhMSEIdeAwYFC5xjCQOPF4UBJwMKSokDAQULih6GdgSIYo0bgRGKLIMjPYFYgkM X-IronPort-AV: E=Sophos;i="4.75,574,1330902000"; d="scan'208";a="143536141" Received: from mail-ob0-f182.google.com ([209.85.214.182]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 12 May 2012 04:08:27 +0200 Received: by obcni5 with SMTP id ni5so6935462obc.27 for ; Fri, 11 May 2012 19:08:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=Q+gajHlBBsMj8PkU8WvBZ6B4KN6It38I78mt/dxubPE=; b=PBhIhHqRKjiI7hBsII/AjaiJISx6n4fnDn3DQ+Vp6g2ZQG4lyxXnD5haP+qGvNIckJ LZwHOYfMXVa9OORHR5Ff12TQNhHLpKOcvwySSDWlitCqptTS+oJqGGE2ECtLErygaKyk s/wfahN7j1uKmXRidfTSdNC65lwb7Lz3rLERNeiz6VsoAECA/V20sOXiozeBSh+E4/pk mfFPeG9R/OUlrxY3WxtKOpdZN7h4Eu/eZBfo0iGFotD/0N0iirxPJZetnQsM3AUDZIQl f24/l3SkaczAcVcvGYM9oXdUmVHSI2NS7Jt2fM3SEWn9bp1OFUKQ4G8unHCSHEG+truA YonA== MIME-Version: 1.0 Received: by 10.182.136.4 with SMTP id pw4mr302428obb.28.1336788506370; Fri, 11 May 2012 19:08:26 -0700 (PDT) Sender: jacques.garrigue@gmail.com Received: by 10.182.122.102 with HTTP; Fri, 11 May 2012 19:08:26 -0700 (PDT) Received: by 10.182.122.102 with HTTP; Fri, 11 May 2012 19:08:26 -0700 (PDT) In-Reply-To: References: Date: Sat, 12 May 2012 11:08:26 +0900 X-Google-Sender-Auth: 311dWh8qFSj8H4sm_tez-PPalBI Message-ID: From: Jacques Garrigue To: Joel Reymont Cc: caml-list@inria.fr Content-Type: multipart/alternative; boundary=e89a8f6471b10fe34604bfcd54f6 Subject: Re: [Caml-list] camlp4 and generating class definitions --e89a8f6471b10fe34604bfcd54f6 Content-Type: text/plain; charset=ISO-8859-1 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" : > 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 > > --e89a8f6471b10fe34604bfcd54f6 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

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?

=A0 =A0Thanks in advace, Joel

--------------------------------------------------------------------------<= br> AlgoKit: EasyLanguage trading strategies, on the server, w/ Rithmic R|API ---------------------+------------+---------------------------------------<= br> http://wagerlabs.com= | @wagerlabs | http://www.linkedin.com/in/joelreymont
---------------------+------------+---------------------------------------<= br>
--
Caml-list mailing list. =A0Subscription 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

--e89a8f6471b10fe34604bfcd54f6--