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 mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id E8B70BC58 for ; Tue, 14 Sep 2010 14:47:08 +0200 (CEST) X-IronPort-AV: E=Sophos;i="4.56,364,1280700000"; d="scan'208";a="69489073" Received: from saorge.inria.fr (HELO [138.96.248.57]) ([138.96.248.57]) by mail4-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-CAMELLIA256-SHA; 14 Sep 2010 14:47:08 +0200 Subject: Re: [Caml-list] Compiling Ocaml sources to c sources From: Thomas Gazagnaire To: Vincent Gripon Cc: caml-list@yquem.inria.fr In-Reply-To: <4C8F660B.4060901@telecom-bretagne.eu> References: <4C8F660B.4060901@telecom-bretagne.eu> Content-Type: text/plain; charset="UTF-8" Date: Tue, 14 Sep 2010 14:47:08 +0200 Message-ID: <1284468428.2252.400.camel@saorge.inria.fr> Mime-Version: 1.0 X-Mailer: Evolution 2.30.2 Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; ocaml:01 bigloo:01 compiler:01 ocaml:01 syntax:01 functors:01 variants:01 cheers:01 www-sop:01 0200,:01 planing:01 compilable:01 pointer:01 -output-obj:01 compiler:01 Hi Vincent! you can try camloo [1] which compiles (old-syntax) caml-light to bigloo, which is a scheme to C compiler. I reckon it would be quite easy to update it to parse the ocaml syntax if you don't use functors/objects/variants/labels/thread (ie. if you use only what is available in caml-light). Cheers, Thomas [1] http://www-sop.inria.fr/members/Thomas.Gazagnaire/ On Tue, 2010-09-14 at 14:09 +0200, Vincent Gripon wrote: > Hello, > > We are currently planing to participate to a programming contest. This > contest allows the use of four languages (C/C#/C++/java) but not > OCaml. > > We would like to use Ocaml as it is to us the language that fits the > most the kind of exercises proposed. The organizers don't mind if we > use OCaml as long as we provide an easily compilable C source to them, > even if it is not readable. > > Is there any platform independent way to compile OCaml sources to C > sources? And if not, do you have any pointer (we gave a try at > compiling OCaml sources to C object files using the -output-obj option > but couldn't compile then the resulting file with our C compiler)? > > Best, > > Vincent > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs