From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 80097BB9C for ; Sun, 18 Sep 2005 15:04:46 +0200 (CEST) Received: from mail-in-01.arcor-online.net (mail-in-01.arcor-online.net [151.189.21.41]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j8ID4jQN023499 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Sun, 18 Sep 2005 15:04:46 +0200 Received: from mail-in-04-z2.arcor-online.net (mail-in-04-z2.arcor-online.net [151.189.8.16]) by mail-in-01.arcor-online.net (Postfix) with ESMTP id F2FBD2E046; Sun, 18 Sep 2005 15:04:44 +0200 (CEST) Received: from mail-in-08.arcor-online.net (mail-in-08.arcor-online.net [151.189.21.48]) by mail-in-04-z2.arcor-online.net (Postfix) with ESMTP id DD2BB10CB1D; Sun, 18 Sep 2005 15:04:41 +0200 (CEST) Received: from mail.arcor.de (dialin-212-144-208-236.arcor-ip.net [212.144.208.236]) by mail-in-08.arcor-online.net (Postfix) with ESMTP id 4F1ED792C7; Sun, 18 Sep 2005 15:04:43 +0200 (CEST) Received: by denkmaschine.unterwegs.local (Postfix, from userid 500) id 29FCD1DE35F8; Mon, 19 Sep 2005 15:08:12 +0200 (CEST) To: jonathan.roewen@gmail.com Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] lisp to ocaml References: From: Christoph Bauer Date: Mon, 19 Sep 2005 15:08:11 +0200 In-Reply-To: (Jonathan Roewen's message of "Sun, 18 Sep 2005 13:08:19 +1200") Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/22.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Miltered: at nez-perce with ID 432D65ED.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocaml:01 ocaml:01 parentheses:01 ml':01 cmo:01 cmo:01 cmi:01 ocamlc:01 -where:01 rec:01 printf:01 printf:01 ich:98 1.0:98 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=FORGED_RCVD_HELO autolearn=disabled version=3.0.3 Hi, > Hi, > > Does anyone know of a tool that can convert lisp to ocaml (or > something other ML dialect)? I've tried googling and couldn't find > anythinge Just all the parentheses gets a bit confusing for a first > look at lisp ;t) camlp4/scheme could be interesting. input file `example.ml': (define f (lambda (n) (+ n 1))) output of % camlp4 pa_scheme.cmo pr_o.cmo example.ml let f n = n + 1 This extension is included in the ocaml distribution under ocaml-3.08.4/camlp4/unmaintained/scheme You have to install it by yourself, e.g. make && cp *.cmo *.cmi `ocamlc -where`/camlp4 regards, Christoph Bauer -- let () = let rec f a w i j = Printf.printf "%.20f\r" a; let a1 = a *. i /. j in if w then f a1 false (i +. 2.0) j else f a1 true i (j +. 2.0) in f 2.0 false 2.0 1.0