From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id DBE95BB84 for ; Mon, 8 Sep 2008 22:41:13 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ap0CAMIqxUjAXQIniGdsb2JhbACSRgEBAQ8go3OBZA X-IronPort-AV: E=Sophos;i="4.32,360,1217800800"; d="scan'208";a="16717983" Received: from concorde.inria.fr ([192.93.2.39]) by mail3-smtp-sop.national.inria.fr with ESMTP; 08 Sep 2008 22:41:13 +0200 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id m88KfCS1025711 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Mon, 8 Sep 2008 22:41:13 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ap0CAMIqxUhDz4HeiGdsb2JhbACSRgEBAQ8go3OBZA X-IronPort-AV: E=Sophos;i="4.32,360,1217800800"; d="scan'208";a="16988268" Received: from fettunta.fettunta.org ([67.207.129.222]) by mail1-smtp-roc.national.inria.fr with ESMTP; 08 Sep 2008 22:41:11 +0200 Received: from aquarium.takhisis.invalid (unknown [10.17.0.18]) by fettunta.fettunta.org (Postfix) with ESMTP id 97D7B180AD for ; Mon, 8 Sep 2008 20:41:10 +0000 (UTC) Received: by aquarium.takhisis.invalid (Postfix, from userid 1000) id 5158D61AA; Mon, 8 Sep 2008 22:40:23 +0200 (CEST) Date: Mon, 8 Sep 2008 22:40:23 +0200 From: Stefano Zacchiroli To: OCaml Subject: Re: [Caml-list] Replacing Pervasives? Message-ID: <20080908204023.GA27166@usha.takhisis.invalid> Mail-Followup-To: OCaml References: <1220861166.11009.7.camel@Blefuscu> <1220865475.11009.12.camel@Blefuscu> <48C4F8BB.60408@lri.fr> <1220871079.11009.18.camel@Blefuscu> <48C53F7F.4090805@lri.fr> <1220895304.11009.38.camel@Blefuscu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1220895304.11009.38.camel@Blefuscu> User-Agent: Mutt/1.5.18 (2008-05-17) X-Miltered: at concorde with ID 48C58DE8.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; zacchiroli:01 zack:01 pervasives:01 0200,:01 0200,:01 stdlib:01 pervasives:01 cmo:01 violate:01 ocamlc:01 ocamlc:01 -pp:01 -pp:01 ml':01 camlp:01 On Mon, Sep 08, 2008 at 07:35:04PM +0200, David Teller wrote: > On Mon, 2008-09-08 at 17:06 +0200, Romain Bardou wrote: > > In other word it's as if you changed your "official" > > stdlib/Pervasives.cmo except that it's cleanier as you don't actually > > override it (which would change your Pervasives for all your projects). > Technically, it fails because you have to name your new module > Pervasives and thus cause a conflict with the original Pervasives. Why you need to have the legacy Pervasives around? You can remove it and/or include what you need of it in your customized Pervasives, can't you? That wouldn't violate your requirement of messing around with ocamlc code, you would only do that with the standard library source files. > > Basically, just use any hack which can replace your ocamlc by a script > > which adds "open Myperv;;\n" before calling ocamlc ^^ > Unfortunately, it seems that ocamlc only supports one "-pp" tag. So if I > use a simple "-pp 'cat myprefix.ml'", I become incompatible with > Camlp4 :/ You can use a shell script (or a real program) of your which first invokes camlp4 as a filter and first feeds into it myprefix.ml and after that the real file. More generally your custom program can combine together a pipeline of any number of preprocessors. Cheers. -- Stefano Zacchiroli -*- PhD in Computer Science \ PostDoc @ Univ. Paris 7 zack@{upsilon.cc,pps.jussieu.fr,debian.org} -<>- http://upsilon.cc/zack/ I'm still an SGML person,this newfangled /\ All one has to do is hit the XML stuff is so ... simplistic -- Manoj \/ right keys at the right time