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 RAA00392; Wed, 15 Jan 2003 17:33:59 +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 RAA00251 for ; Wed, 15 Jan 2003 17:33:58 +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 h0FGXrv12404 for ; Wed, 15 Jan 2003 17:33:57 +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 h0FGSYP18789 ; Wed, 15 Jan 2003 17:28: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 h0FGSYx24223 ; Wed, 15 Jan 2003 17:28: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 18YqP3-0003iN-00; Wed, 15 Jan 2003 17:28:33 +0100 Message-ID: <3E258C30.9999165E@lri.fr> Date: Wed, 15 Jan 2003 17:28:32 +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> 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 Thorsten Ohl wrote: > > I'm often referring to module types defined in an interface file in > order to reduce redundancy. For example > > $ cat a.mli > module type T = sig val n : int end > module M : T > > $ cat a.ml > module type T = A.T > module M : T = struct let n = 42 end > > where T can be rather long. Is this legal? For me, your module type declaration should be illegal in a.ml. But the ocaml compiler accepts it... So, is it an ocaml bug ? Orelse what is the exact semantic of (.mli, .ml) ? > The reason I'm asking this, is that my shorthand [as in (a.mli, aml)] > breaks Julien Signoles' defunctorizer. The previous example doesn't break my defunctorizer : $ ocamldefun --version 1.02 $ ocamldefun a.mli a.ml $ cat a.ml module type T = A.T module M = struct let n = 42 end That's ok (normal because a.mli is still in the ocamldefun environment when a.ml is defunctorized)... Can you report me your example breaking my defunctorizer ? Cheers, 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