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 SAA13460; Tue, 11 Nov 2003 18:24:00 +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 SAA09993 for ; Tue, 11 Nov 2003 18:23:59 +0100 (MET) Received: from avalon.ens-lsh.fr (mailhost.ens-lsh.fr [193.51.131.2]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id hABHNw114587 for ; Tue, 11 Nov 2003 18:23:58 +0100 (MET) Received: from avalon.ens-lsh.fr (localhost [127.0.0.1]) by avalon.ens-lsh.fr (8.12.8/8.12.8) with ESMTP id hABINhTd015488 for ; Tue, 11 Nov 2003 18:23:43 GMT Received: from ens-notes1.ens-lsh.fr (ens-notes1.ens-lsh.fr [10.2.1.44]) by avalon.ens-lsh.fr (8.12.8/8.12.8) with ESMTP id hABINhUY015485 for ; Tue, 11 Nov 2003 18:23:43 GMT Received: from mostha ([10.3.20.31]) by ens-notes1.ens-lsh.fr (Lotus Domino Release 5.0.10) with SMTP id 2003111118235562:15071 ; Tue, 11 Nov 2003 18:23:55 +0100 Date: Tue, 11 Nov 2003 18:25:30 +0100 From: Damien To: caml-list@inria.fr Subject: Re: [Caml-list] type issues with modules Message-Id: <20031111182530.71a9a9c7.Damien.Pous@ens-lyon.fr> In-Reply-To: <20031111172147M.garrigue@kurims.kyoto-u.ac.jp> References: <3FB0749C.80103@cs.uoregon.edu> <20031111172147M.garrigue@kurims.kyoto-u.ac.jp> Organization: mosthagloups X-Mailer: Sylpheed version 0.9.6claws (GTK+ 1.2.10; i386-pc-linux-gnu) Mime-Version: 1.0 X-MIMETrack: Itemize by SMTP Server on ens-notes1/ENS-LSH(Release 5.0.10 |March 22, 2002) at 11/11/2003 18:23:55, Serialize by Router on ens-notes1/ENS-LSH(Release 5.0.10 |March 22, 2002) at 11/11/2003 18:23:57, Serialize complete at 11/11/2003 18:23:57 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Loop: caml-list@inria.fr X-Spam: no; 0.00; damien:01 damien:01 ens-lyon:01 caml-list:01 jacques:01 mli:01 mli:01 struct:01 struct:01 fussy:01 ocamlc:01 -pack:01 cmo:01 sig:01 sig:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Tue, 11 Nov 2003 17:21:47 +0900 Jacques Garrigue wrote: > As specified in the reference manual, the combination of .ml and .mli > is expected to mean: > module type Sig_mod1 = sig end > module Struct_mod1 = struct end > module Mod1 : Sig_mod1 = Struct_mod1 Let's be a bit fussy... The manual says : << module Mod1: sig end = struct end >> Hopefully, because the first translation would export hidden parts of Mod1 via Struct_mod1. But I think that giving a name to the signature of Mod1 (Sig_mod1) could be useful : << module type MOD1 : sig end module Mod1 : MOD1 = struct end >> Especially when hand-packing some modules : "ocamlc -pack" checks the packed cmo against an optional interface file, but the latter is rather boring to write, since one has to copy&paste the content of each packed interface. If the module types were given a name, one could just write << module Mod1: MOD1 ... >> damien PS: I tried "module Mod1: Sig_mod1", of course it doesn't work :-( ------------------- 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