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 WAA09954; Wed, 15 Jan 2003 22:58:04 +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 WAA09763 for ; Wed, 15 Jan 2003 22:58:03 +0100 (MET) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from opus.davidb.org (66-27-72-19.san.rr.com [66.27.72.19]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h0FLw1v19079 for ; Wed, 15 Jan 2003 22:58:02 +0100 (MET) Received: from davidb by opus.davidb.org with local (Exim 3.31 #1 (Debian)) id 18YvXU-0003E9-00; Wed, 15 Jan 2003 13:57:36 -0800 Date: Wed, 15 Jan 2003 13:57:36 -0800 From: David Brown To: Julien Signoles Cc: ohl@physik.uni-wuerzburg.de, caml-list@inria.fr Subject: Re: [Caml-list] Re: Legality of using module types from .mli in .ml Message-ID: <20030115215736.GA12377@opus.davidb.org> References: <15908.25011.52235.354636@wptx47.physik.uni-wuerzburg.de> <3E258C30.9999165E@lri.fr> <15909.37765.318147.247156@wptx47.physik.uni-wuerzburg.de> <3E259C5D.25AFBC88@lri.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3E259C5D.25AFBC88@lri.fr> User-Agent: Mutt/1.4i Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Wed, Jan 15, 2003 at 06:37:33PM +0100, Julien Signoles wrote: > > ohl@wptx47:~misc$ ocamldefun -v > > 1.02 > > ohl@wptx47:~misc$ cat a.mli > > module type T = sig val n : int end > > module M : T > > ohl@wptx47:~misc$ cat a.ml > > module type T = A.T > > module M : T = struct let n = 42 end > > ohl@wptx47:~misc$ ocamldefun -d defun a.mli a.ml > > ohl@wptx47:~misc$ cd defun/ > > ohl@wptx47:~defun$ ls > > a.cmd a.ml > > ohl@wptx47:~defun$ cat a.ml > > module type T = A.T > > module M = struct let n = 42 end > > ohl@wptx47:~defun$ ocamlopt a.ml > > File "a.ml", line 1, characters 16-19: > > Unbound module type A.T > > > > I could ignore appendix B of the manual and create a a.cmi: > > > > ohl@wptx47:~defun$ cp ../a.mli . > > ohl@wptx47:~defun$ ocamlc a.mli > > ohl@wptx47:~defun$ ocamlopt a.ml Would it no work to ~misc$ ocamlc -c a.mli ~misc$ cd defun/ ~misc$ ocamlopt -c -I .. a.ml Dave Brown ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners