Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
* [Caml-list] camlp4 and generating class definitions
@ 2012-05-11 20:27 Joel Reymont
  2012-05-11 20:52 ` Philippe Veber
  2012-05-12  2:08 ` Jacques Garrigue
  0 siblings, 2 replies; 3+ messages in thread
From: Joel Reymont @ 2012-05-11 20:27 UTC (permalink / raw)
  To: caml-list

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
---------------------+------------+---------------------------------------

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] camlp4 and generating class definitions
  2012-05-11 20:27 [Caml-list] camlp4 and generating class definitions Joel Reymont
@ 2012-05-11 20:52 ` Philippe Veber
  2012-05-12  2:08 ` Jacques Garrigue
  1 sibling, 0 replies; 3+ messages in thread
From: Philippe Veber @ 2012-05-11 20:52 UTC (permalink / raw)
  To: Joel Reymont; +Cc: caml-list

[-- Attachment #1: Type: text/plain, Size: 1087 bytes --]

Hi Joel,

You can have a look at Martin Jambon's col syntax extension :

https://github.com/pveber/col

Have a look at pa_col.ml, starting line 400.

Cheers,
  Philippe.


2012/5/11 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
>
>

[-- Attachment #2: Type: text/html, Size: 1913 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] camlp4 and generating class definitions
  2012-05-11 20:27 [Caml-list] camlp4 and generating class definitions Joel Reymont
  2012-05-11 20:52 ` Philippe Veber
@ 2012-05-12  2:08 ` Jacques Garrigue
  1 sibling, 0 replies; 3+ messages in thread
From: Jacques Garrigue @ 2012-05-12  2:08 UTC (permalink / raw)
  To: Joel Reymont; +Cc: caml-list

[-- Attachment #1: Type: text/plain, Size: 1105 bytes --]

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
>
>

[-- Attachment #2: Type: text/html, Size: 1842 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-05-12  2:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-11 20:27 [Caml-list] camlp4 and generating class definitions Joel Reymont
2012-05-11 20:52 ` Philippe Veber
2012-05-12  2:08 ` Jacques Garrigue

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox