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 UAA22270; Sat, 28 Dec 2002 20:21:09 +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 UAA22386 for ; Sat, 28 Dec 2002 20:21:08 +0100 (MET) Received: from mailout.ntsource.com (mailout.ntsource.com [208.223.150.20]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id gBSJL7H22953 for ; Sat, 28 Dec 2002 20:21:07 +0100 (MET) Received: from [63.74.181.9] (chi4-port09.ntso.com [63.74.181.9]) (authenticated) by mailout.ntsource.com (8.11.6/8.11.6) with ESMTP id gBSJL2o07791 for ; Sat, 28 Dec 2002 13:21:02 -0600 Mime-Version: 1.0 X-Sender: tinman@127.0.0.1 Message-Id: In-Reply-To: <20021227073709.GD608@swordfish> References: <20021227073709.GD608@swordfish> Date: Sat, 28 Dec 2002 13:18:53 -0600 To: caml-list@inria.fr From: Dave Newman Subject: [Caml-list] Can One Define LISP-like Macros in Ocaml? Content-Type: text/plain; charset="us-ascii" ; format="flowed" Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Seeing the LISP like output from -dlambda reminded me of a question I've had about ocaml. Is there any support for defining macros in ocaml akin to LISP defmacro? --Dave >On Thu, Dec 26, 2002 at 09:55:09PM -0600, Gurr, David (MED, self) wrote: >> try "ocamlc -dlambda foo.ml" > >Wow. That outputs something that looks a lot like LISP. And -dlambda >seems to be undocumented, at least in the man page and the HTML user's >manual. What is it intended for? {{{ text removed }}} >bash-2.05a$ ocamlc -dlambda foo1.ml >(setglobal Foo1! > (seq > (let (foo/56 (function i/57 (if (>= i/57 500) 1a 0a))) > (for i/59 1 to 100000 > (ignore (apply foo/56 (apply (field 4 (global Random!)) 1000))))) > (makeblock 0))) > ------------------- 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