caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Tim Docker" <timothy.docker@macquarie.com>
To: "Kenneth Knowles" <kknowles@berkeley.edu>
Cc: <caml-list@inria.fr>
Subject: RE: [Caml-list] Basic question about modules
Date: Tue, 23 Mar 2004 21:59:49 -0000	[thread overview]
Message-ID: <7F3CFECC66117548BE71E9D7CD2EFB504349A5@nt_lon_exm01.pc.internal.macquarie.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1141 bytes --]

> 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 = String.t
 |     and 'a t = '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 = int list StringMap.t
 | and named_values = { 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


[-- Attachment #2: Type: text/html, Size: 2063 bytes --]

             reply	other threads:[~2004-03-23 22:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-23 21:59 Tim Docker [this message]
2004-03-23 22:33 ` Kenneth Knowles
  -- strict thread matches above, loose matches on Subject: below --
2004-03-23 20:42 Tim Docker
2004-03-23 21:02 ` Kenneth Knowles
2004-03-23 21:12 ` Matthieu Dubuget

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7F3CFECC66117548BE71E9D7CD2EFB504349A5@nt_lon_exm01.pc.internal.macquarie.com \
    --to=timothy.docker@macquarie.com \
    --cc=caml-list@inria.fr \
    --cc=kknowles@berkeley.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).