Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] camlp4sch documentation
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Bruno.Verlyck@i...
Subject: Re: [Caml-list] camlp4sch documentation
   From: Christoph Bauer <c_bauer@informatik.uni-kl.de>
   Date: Sat, 06 Mar 2004 20:27:44 +0100

   As I recovered recently, camlp4 supports a scheme like syntax.
   E.g.
    camlp4o pr_scheme.cmo foo.ml
   prints my source code in foo.ml in this syntax.  Juchhu!

   Unfortunately, google didn't find the location of documentation for
   this extension :-(.  Does anybody know anything of this extension?
Well, I do.  Daniel did it for me nearly 2 years ago.  I never saw any
documentation.  I guess the way to learn about it is to read the
pretty-printed source of your code.  Another is to read cstr.sml and
string13.sml (for which pa_scheme was developed) in
 http://pauillac.inria.fr/cash/cstr/index.html
>From the top of my head:
- named let is implemented
- (proc) is the same as (proc ()) -- for better Scheme taste
- tuples are represented by (values ...) -- this is a `non-standard
  implementation' of the real Scheme's values concept.

   E.g. are scheme macros supported?
Definitely no.  I had to first translate to a more standard syntax to
be able to use normal camlp4 macro facilities.

I have no idea if using some portable scheme macro system (such as
syntax-case) to make a source-to-source pass (one would need to have a
real Scheme around) would be feasible.  But I'd be very interested if
someone makes something like this work.  Introducing hygienic macros
in the OCaml world... :-0

Bruno.

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners