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 SAA02483; Wed, 15 Jan 2003 18:48:55 +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 SAA02313 for ; Wed, 15 Jan 2003 18:48:54 +0100 (MET) Received: from lri.lri.fr (lri.lri.fr [129.175.15.1]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h0FHmrv14420 for ; Wed, 15 Jan 2003 18:48:53 +0100 (MET) Received: from serveur-mail.lri.fr (serveur-mail [129.175.8.90]) by lri.lri.fr (8.11.6/jtpda-5.3.2) with ESMTP id h0FHbYP24751 ; Wed, 15 Jan 2003 18:37:34 +0100 (MET) Received: from pc8-119.lri.fr (pc8-119 [129.175.8.119]) by serveur-mail.lri.fr (8.11.6/jtpda-5.3.2) with ESMTP id h0FHbYx26269 ; Wed, 15 Jan 2003 18:37:34 +0100 (MET) Received: from localhost ([127.0.0.1] helo=lri.fr) by pc8-119.lri.fr with esmtp (Exim 3.36 #1 (Debian)) id 18YrTq-0004DK-00; Wed, 15 Jan 2003 18:37:34 +0100 Message-ID: <3E259C5D.25AFBC88@lri.fr> Date: Wed, 15 Jan 2003 18:37:33 +0100 From: Julien Signoles X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.4.17 i686) X-Accept-Language: fr, en MIME-Version: 1.0 To: ohl@physik.uni-wuerzburg.de CC: caml-list@inria.fr Subject: [Caml-list] Re: Legality of using module types from .mli in .ml References: <15908.25011.52235.354636@wptx47.physik.uni-wuerzburg.de> <3E258C30.9999165E@lri.fr> <15909.37765.318147.247156@wptx47.physik.uni-wuerzburg.de> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-MailScanner: Found to be clean Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > 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 > > but I'm not supposed to do that, am I? Effectively, you're not supposed to do that (except if you're sure that the problem of the appendix B cannot be appear in your program). Julien Signoles. -- mailto : Julien.Signoles@lri.fr ; http : www.lri.fr/~signoles "In theory, practice and theory are the same, but in practice they are different" (Larry McVoy) ------------------- 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