From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 51079BC48 for ; Sat, 9 Apr 2005 23:17:11 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j39LHAsZ032045 for ; Sat, 9 Apr 2005 23:17:10 +0200 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 XAA15029 for ; Sat, 9 Apr 2005 23:17:10 +0200 (MET DST) Received: from out1.smtp.messagingengine.com (out1.smtp.messagingengine.com [66.111.4.25]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j39LH9qf032034 for ; Sat, 9 Apr 2005 23:17:10 +0200 Received: from frontend3.messagingengine.com (frontend3.internal [10.202.2.152]) by frontend1.messagingengine.com (Postfix) with ESMTP id D270CC71854; Sat, 9 Apr 2005 17:17:07 -0400 (EDT) X-Sasl-enc: oDJSG/fRM+14oPm1pRv0hg 1113081426 Received: from [172.16.13.153] (unknown [192.231.106.2]) by frontend3.messagingengine.com (Postfix) with ESMTP id 186E425535; Sat, 9 Apr 2005 17:17:04 -0400 (EDT) Date: Sat, 9 Apr 2005 14:16:41 -0700 (PDT) From: Martin Jambon X-X-Sender: martin@localhost To: =?iso-8859-1?Q?S=E9bastien?= Hinderer Cc: caml-list@inria.fr, =?iso-8859-1?Q?S=E9bastien?= Hinderer Subject: Re: [Caml-list] Syntactic inclusion of a.ml in b.ml ? In-Reply-To: <20050408174142.GA1804@galois> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT X-Miltered: at concorde with ID 42584656.002 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 42584655.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 gcc:01 ocamlc:01 wrote:01 syntactic:01 jambon:01 jambon:01 seems:03 inclusion:03 rename:04 sebastien:05 fri:05 apr:07 maybe:07 apparently:07 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.1 required=5.0 tests=FORGED_RCVD_HELO autolearn=disabled version=3.0.2 X-Spam-Level: On Fri, 8 Apr 2005, Sébastien Hinderer wrote: > Dear all, > > (How) is it possible to include syntactically a file a.ml in a file > b.ml ? > > One method that seems to w)rk is to rename b.ml to b.ml.c, > and then have in b.ml.c a line saying > #include "a.ml" > And with this, gcc -E b.ml.c > b.ml > produces a file that ocamlc can apparently handle. > > But is this considered a good solution, or is some better solution > available ? You can maybe use camlmix: http://martin.jambon.free.fr/toolbox.html#ppocaml http://martin.jambon.free.fr/camlmix Martin -- Martin Jambon, PhD http://martin.jambon.free.fr