From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.6.10/8.6.6) id TAA03172 for caml-redistribution; Mon, 17 Jun 1996 19:31:17 +0200 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.6.10/8.6.6) with ESMTP id KAA05666 for ; Mon, 17 Jun 1996 10:07:39 +0200 Received: from cherub.hd.ibm.de ([192.101.197.10]) by concorde.inria.fr (8.7.1/8.7.1) with SMTP id KAA09024 for ; Mon, 17 Jun 1996 10:07:28 +0200 (MET DST) Received: from kaa.heidelbg.ibm.com by cherub.hd.ibm.de (AIX 3.2/UCB 5.64/4.03/chkV1.0) id AA22084; Mon, 17 Jun 1996 10:06:46 +0200 Received: from idse.heidelbg.ibm.com by kaa.heidelbg.ibm.com (AIX 3.2/UCB 5.64/4.03) id AA17752; Mon, 17 Jun 1996 10:06:13 +0200 Received: by idse.heidelbg.ibm.com (AIX 3.2/UCB 5.64/4.03) id AA75827; Mon, 17 Jun 1996 10:06:12 +0200 Message-Id: <9606170806.AA75827@idse.heidelbg.ibm.com> To: Bouzid Djamila Cc: caml-list@pauillac.inria.fr Subject: Re: Probleme d'interface In-Reply-To: (Your message of Fri, 14 Jun 96 17:45:23 O.) <199606141545.RAA19033@delsarte.loria.fr> Date: Mon, 17 Jun 96 10:06:11 +0100 From: Wolfgang Lux Sender: weis Bouzid Djamila writes: > So I have mixed vendor.mli and vendor.ml in a single file vendor.ml. > [ vendor.ml omitted ] > > So the compilation is > > finot ip 61 % cslc vendor.ml > I/O error: vendor.cmi: No such file or directory > finot ip 62 % > > What means this error, if vendor.cmi is generated in compilation. I guess you haven't deleted or moved away vendor.mli. Before generating vendor.cmi from vendor.ml, the compiler first looks for a file vendor.mli in the same directory as vendor.ml and if one is found it assumes, that the interface file vendor.mli should be compiled first to generate vendor.cmi. Only if that file doesn't exist, it will generate a default interface from vendor.ml. > > I have'nt inderstood why module V is not visible at all outside in this > case of vendor.ml. ^^^ > Just because all exported entities (types, values, modules and module types) must also be declared in the interface specification, aka signature of the module. Your interface did only export the module types VENDOR and VENDOR_INTEGER, but not the module V. So it isn't visible outside of vendor. > > > > If you look into the Caml Special Light reference, > > please, could you tell me where can I find this reference ? > I have only Caml Special Light reference manual, I want to have > more references of this language. Sorry, I meant the reference manual. [ ... ] > > But if we want have > > module V : VENDOR = > ....... > end (*V*) > > module V1 = V > module V2 = V > > or > > module V (....) : VENDOR = > struct > ...... > end (*functor*) > > What should I do ? > You can simply add the following declaration to your interface file vendor.mli: module V : VENDOR or module V (TimingBoard: TIMINGBOARD) : VENDOR So the file vendor.mli, from your original posting should read: module type VENDOR_INTEGER = sig val min : int * int -> int end (* sig *) module type VENDOR = sig val print: string -> unit module Integer : VENDOR_INTEGER end (* sig *) module V : VENDOR Regards Wolfgang ---- Wolfgang Lux WZH Heidelberg, IBM Germany Internet: lux@heidelbg.ibm.com +49-6221-59-4546 VNET: LUX at HEIDELBG +49-6221-59-3500 (fax) EARN: LUX at DHDIBMIP