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 XAA17359; Tue, 23 Mar 2004 23:00:00 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id WAA16857 for ; Tue, 23 Mar 2004 22:59:59 +0100 (MET) Received: from mblmail2op.macquarie.com.au (mblmail2op.macquarie.com.au [203.202.145.21]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i2NLxuHd001103 for ; Tue, 23 Mar 2004 22:59:57 +0100 Received: from isdc1n2.macbank (isdc1n2 [10.123.0.197]) by mblmail2op.macquarie.com.au (8.12.9/8.12.9) with ESMTP id i2NLxs2P018516 for ; Wed, 24 Mar 2004 08:59:55 +1100 (EST) Received: from ntsydms03.pc.internal.macquarie.com (ntsydms03 [10.124.16.67]) by isdc1n2.macbank (8.11.7+Sun/8.11.7) with ESMTP id i2NLxs814146 for ; Wed, 24 Mar 2004 08:59:54 +1100 (EST) Received: from nt_syd_exc02.pc.internal.macquarie.com (unverified) by ntsydms03.pc.internal.macquarie.com (Content Technologies SMTPRS 4.3.12) with ESMTP id ; Wed, 24 Mar 2004 08:59:54 +1100 Received: from nt_lon_exm01.pc.internal.macquarie.com ([10.32.2.14]) by nt_syd_exc02.pc.internal.macquarie.com with Microsoft SMTPSVC(5.0.2195.6713); Wed, 24 Mar 2004 08:59:54 +1100 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C41122.29A69280" X-MimeOLE: Produced By Microsoft Exchange V6.0.6375.0 Subject: RE: [Caml-list] Basic question about modules Date: Tue, 23 Mar 2004 21:59:49 -0000 Message-ID: <7F3CFECC66117548BE71E9D7CD2EFB504349A5@nt_lon_exm01.pc.internal.macquarie.com> Thread-Topic: [Caml-list] Basic question about modules Thread-Index: AcQRGi3jPSC4E4qJTiS4a3Ob8kdsaAABrrqa From: "Tim Docker" To: "Kenneth Knowles" Cc: X-OriginalArrivalTime: 23 Mar 2004 21:59:54.0323 (UTC) FILETIME=[2C503230:01C41122] X-Miltered: at concorde by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 ocamlc:01 mli:01 inspect:01 val:01 val:01 mli:01 datatypes:01 functor:01 caml-list:01 ocamlc:01 inspect:01 W4:99 W4:99 datatypes:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk X-Status: X-Keywords: X-UID: 338 This is a multi-part message in MIME format. ------_=_NextPart_001_01C41122.29A69280 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable > Well, you can use `ocamlc -i' to initially create the .mli file, > or inspect its output for help. Thanks - this is good. Looking at the output, I see that the entire signature for the string map is present: | module StringMap : | sig | type key =3D String.t | and 'a t =3D 'a Map.Make(String).t | val empty : 'a t | val add : key -> 'a -> 'a t -> 'a t | val find : key -> 'a t -> 'a | val remove : key -> 'a t -> 'a t | val mem : key -> 'a t -> bool | val iter : (key -> 'a -> unit) -> 'a t -> unit | val map : ('a -> 'b) -> 'a t -> 'b t | val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t | val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b | end | type info =3D int list StringMap.t | and named_values =3D { details : info; } Do I actually have to duplicate the above signature for the StringMap as shown above in my own mli file (and other similar types). This seems pretty heavy handed. At the end of the day I am just attempting to define some datatypes that include maps of various types created with the Map.Make functor. Thanks, Tim ------_=_NextPart_001_01C41122.29A69280 Content-Type: text/html; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable RE: [Caml-list] Basic question about modules

> Well, you can use `ocamlc -i' to initially create = the .mli file,
> or inspect its output for help.

Thanks - this is good. Looking at the output, I see that the entire
signature for the string map is present:

 | module StringMap :
 |   sig
 |     type key =3D String.t
 |     and 'a t =3D 'a Map.Make(String).t
 |     val empty : 'a t
 |     val add : key -> 'a -> 'a t -> = 'a t
 |     val find : key -> 'a t -> 'a
 |     val remove : key -> 'a t -> 'a = t
 |     val mem : key -> 'a t -> bool
 |     val iter : (key -> 'a -> unit) = -> 'a t -> unit
 |     val map : ('a -> 'b) -> 'a t -> = 'b t
 |     val mapi : (key -> 'a -> 'b) -> = 'a t -> 'b t
 |     val fold : (key -> 'a -> 'b -> = 'b) -> 'a t -> 'b -> 'b
 |   end
 | type info =3D int list StringMap.t
 | and named_values =3D { details : info; }

Do I actually have to duplicate the above signature for the = StringMap
as shown above in my own mli file (and other similar types).
This seems pretty heavy handed.

At the end of the day I am just attempting to define some datatypes
that include maps of various types created with the Map.Make = functor.

Thanks,

Tim

------_=_NextPart_001_01C41122.29A69280-- ------------------- 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