caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] camlp4sch documentation
@ 2004-03-06 19:27 Christoph Bauer
  2004-03-08 11:46 ` Bruno.Verlyck
  0 siblings, 1 reply; 2+ messages in thread
From: Christoph Bauer @ 2004-03-06 19:27 UTC (permalink / raw)
  To: OCaml List

Hi,

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?
E.g. are scheme macros supported? 

Regards,
Christoph Bauer

-- 
beginfig(1)u=3cm;draw fullcircle scaled 2u;x0=x1=y1=x2=y3=0;-y0=y2=x3=1u;
filldraw z0..{left}z1{left}..z2{curl 1}..z3..z0..cycle;def t(expr p)=fullcircle
scaled .25u shifted(0,p*u);enddef;unfill t(.5);fill t(-.5);endfig;bye

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


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

* Re: [Caml-list] camlp4sch documentation
  2004-03-06 19:27 [Caml-list] camlp4sch documentation Christoph Bauer
@ 2004-03-08 11:46 ` Bruno.Verlyck
  0 siblings, 0 replies; 2+ messages in thread
From: Bruno.Verlyck @ 2004-03-08 11:46 UTC (permalink / raw)
  To: c_bauer; +Cc: caml-list

   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


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

end of thread, other threads:[~2004-03-08 11:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-06 19:27 [Caml-list] camlp4sch documentation Christoph Bauer
2004-03-08 11:46 ` Bruno.Verlyck

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