From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id MAA28180; Mon, 8 Mar 2004 12:46:11 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id MAA27686 for ; Mon, 8 Mar 2004 12:46:10 +0100 (MET) Received: from waco.inria.fr (waco.inria.fr [128.93.25.2]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i28Bk8V7013195; Mon, 8 Mar 2004 12:46:08 +0100 Received: from waco.inria.fr (localhost [127.0.0.1]) by waco.inria.fr (8.12.10/8.12.10) with ESMTP id i28Bk8Kk007661; Mon, 8 Mar 2004 12:46:08 +0100 Received: (from verlyck@localhost) by waco.inria.fr (8.12.10/8.12.10/Submit) id i28Bk8Bn007660; Mon, 8 Mar 2004 12:46:08 +0100 Date: Mon, 8 Mar 2004 12:46:08 +0100 Message-Id: <200403081146.i28Bk8Bn007660@waco.inria.fr> To: c_bauer@informatik.uni-kl.de CC: caml-list@inria.fr In-reply-to: (c_bauer@informatik.uni-kl.de) Subject: Re: [Caml-list] camlp4sch documentation From: Bruno.Verlyck@inria.fr References: Mime-Version: 1.0 (generated by tm-edit 7.106) Content-Type: text/plain; charset=US-ASCII X-Miltered: at concorde by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 camlp:01 bauer:01 bauer:01 2004:99 recovered:99 camlp:01 foo:01 foo:01 implemented:01 non-standard:01 scheme's:01 cmo:01 ocaml:01 feasible:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk X-Keywords: X-UID: 74 From: Christoph Bauer 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