caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* what do I need to know to understand camlp4
@ 2010-09-23 14:56 ben kuin
  2010-09-23 15:21 ` [Caml-list] " David MENTRE
                   ` (4 more replies)
  0 siblings, 5 replies; 15+ messages in thread
From: ben kuin @ 2010-09-23 14:56 UTC (permalink / raw)
  To: caml-list

hi
I'm a Ocaml n00b (without any degree). Therefore I have a faible for
everything that makes Ocamls syntax more algol/imperative like [1]. An
example would be an extension like 'newref'
(http://bitbucket.org/johannes/newref/wiki/Home), which turns:

    print_int !i       into       print_int $i    (* newref *)

so I fiercely try to also perlify the declaration that turns

     let i = ref 3     into        let $i = 3     (* my idea ... *)

but camlp4 makes my head spin. The syntax is very difficult and in a
lot of camlp4 documentation there is AST modification involved, which
is a subject I don't get although I made several attempts. And simple
program transformation with camlp4 (using concrete syntax) is nowhere
documented.

Could someone give any idea how I can begin to understand how to write
simple camlp4 extensions?

thanks
ben

[1] please don't kill me


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

end of thread, other threads:[~2010-09-27 11:43 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-23 14:56 what do I need to know to understand camlp4 ben kuin
2010-09-23 15:21 ` [Caml-list] " David MENTRE
2010-09-23 19:50   ` ben kuin
2010-09-24  0:15     ` Elias Gabriel Amaral da Silva
2010-09-24  7:35       ` David House
2010-09-27 11:43         ` Elias Gabriel Amaral da Silva
2010-09-24  7:48     ` David MENTRE
2010-09-23 15:25 ` bluestorm
2010-09-23 16:23   ` Jake Donham
2010-09-23 18:49     ` ben kuin
2010-09-23 18:54       ` Jake Donham
2010-09-23 19:06       ` Yoann Padioleau
2010-09-23 16:28 ` Michael Ekstrand
2010-09-23 16:35 ` Sylvain Le Gall
     [not found] ` <1285259219.1820.15.camel@knine>
2010-09-23 18:43   ` [Caml-list] " ben kuin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).