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 WAA02604; Wed, 9 Jan 2002 22:31:04 +0100 (MET) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id WAA02536 for ; Wed, 9 Jan 2002 22:31:03 +0100 (MET) Received: from nef.ens.fr (nef.ens.fr [129.199.96.32]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g09LV2P14096 for ; Wed, 9 Jan 2002 22:31:02 +0100 (MET) Received: from dmi.ens.fr (dmi.ens.fr [129.199.96.11]) by nef.ens.fr (8.10.1/1.01.28121999) with ESMTP id g09LUwX92372 ; Wed, 9 Jan 2002 22:30:58 +0100 (CET) Received: from basilic.ens.fr (monniaux@basilic [129.199.99.48]) by dmi.ens.fr (8.10.1/jb-1.3-180200) id g09LUvb11556 ; Wed, 9 Jan 2002 22:30:57 +0100 (MET) Received: from localhost (monniaux@localhost) by basilic.ens.fr (8.11.0/jb-1.1) id g09LUtJ19924 ; Wed, 9 Jan 2002 22:30:55 +0100 (MET) X-Authentication-Warning: basilic.ens.fr: monniaux owned process doing -bs Date: Wed, 9 Jan 2002 22:30:55 +0100 (MET) From: David Monniaux X-Sender: monniaux@basilic.ens.fr To: Ian Zimmerman cc: OCAML Subject: Re: [Caml-list] -i option to compiler In-Reply-To: <861ygzb4sx.fsf@speakeasy.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On 9 Jan 2002, Ian Zimmerman wrote: > kronstadt:~$ ocamlc -i foo.ml > foo.mli > I/O error: foo.cmi: No such file or directory This one is classical. When you use > foo.mli, the shell creates foo.mli BEFORE running ocamlc. So when ocamlc sees that there is a .mli file, it looks for the corresponding .cmi and complains loudly that it does not exist. The solution is to do ocamlc -i foo.ml > foo.mli.tmp mv foo.mli.fmp foo.ml I guess that the compiler should accept a -output-mli option or something similar, to avoid the above kludge. David Monniaux http://www.di.ens.fr/~monniaux Laboratoire d'informatique de l'École Normale Supérieure, Paris, France ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr