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 WAA02016; Wed, 9 Jan 2002 22:19:51 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 WAA01820 for ; Wed, 9 Jan 2002 22:19:50 +0100 (MET) Received: from mail12.speakeasy.net (mail12.speakeasy.net [216.254.0.212]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g09LJnP13980 for ; Wed, 9 Jan 2002 22:19:49 +0100 (MET) Received: (qmail 16647 invoked from network); 9 Jan 2002 21:19:42 -0000 Received: from unknown (HELO kronstadt) ([64.81.49.223]) (envelope-sender ) by mail12.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 9 Jan 2002 21:19:42 -0000 Received: from itz by kronstadt with local (Exim 3.33 #1 (Debian)) id 16OQ8M-00056u-00 for ; Wed, 09 Jan 2002 13:19:42 -0800 To: caml-list@inria.fr (OCAML) Subject: [Caml-list] -i option to compiler From: Ian Zimmerman Date: 09 Jan 2002 13:19:42 -0800 Message-ID: <861ygzb4sx.fsf@speakeasy.org> User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi, I remember using the -i option successfully in the past to generate a fat interface to an existing .ml file. However, after upgrading to 3.04 and trying to recompile some of my stuff, I can't seem to remember how to do without an excessive amount of pain. I have a file foo.ml, and I want to generate foo.mli. kronstadt:~$ cat >>foo.ml let i = 1 kronstadt:~$ ocamlc -i foo.ml > foo.mli I/O error: foo.cmi: No such file or directory kronstadt:~$ ocamlc -i -c foo.ml > foo.mli I/O error: foo.cmi: No such file or directory kronstadt:~$ ocamlc -c foo.ml I/O error: foo.cmi: No such file or directory kronstadt:~$ rm foo.mli kronstadt:~$ ocamlc -c foo.ml kronstadt:~$ ls -l foo.cmo -rw-rw-r-- 1 itz itz 145 Jan 9 13:14 foo.cmo kronstadt:~$ ocamlc -i -c foo.ml > foo.mli kronstadt:~$ ls -l foo.cmo -rw-rw-r-- 1 itz itz 147 Jan 9 13:15 foo.cmo kronstadt:~$ So, it seems that I have to first _compile_ foo.ml to get both foo.cmi and foo.cmo, and then compile it _again_ with the -i flag to get foo.mli. Is that so? Isn't there a way to generate _just_ foo.mli and not the object file? -- Ian Zimmerman, Oakland, California, U.S.A. GPG: 433BA087 9C0F 194F 203A 63F7 B1B8 6E5A 8CA3 27DB 433B A087 In his own soul a man bears the source from which he draws all his sorrows and his joys. Sophocles. ------------------- 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