caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Benedikt Grundmann" <benedikt-grundmann@web.de>
To: skaller <skaller@users.sourceforge.net>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] module interface?
Date: Mon, 30 Jul 2007 10:02:12 +0200	[thread overview]
Message-ID: <9b415f950707300102r47d62264g1d355cd42d08b1c1@mail.gmail.com> (raw)
In-Reply-To: <1185782144.6753.13.camel@rosella.wigram>

Easy in map.mli you find:

module Make (Ord : OrderedType) : S with type key = Ord.t

After that it is obvious (at least if you have seen it before :-) )

Cheers,

Bene



2007/7/30, skaller <skaller@users.sourceforge.net>:
> On Mon, 2007-07-30 at 09:03 +0200, Benedikt Grundmann wrote:
> > module Drules : Map.S with type key = string
>
> So I discovered -- thanks! But hmm, this totally counter intuitive!
>
> You call Map.Make, but refer to Map.S.
> The supplied key is with
>
>         type t = string
>
> but in the sig you use
>
>         type key = string
>
> and finally the
>
>         let compare = compare
>
> in the module is simply dropped.
>
> There is no example of this in the tutorial..
> how would I every guess at the right solution?
>
> --
> John Skaller <skaller at users dot sf dot net>
> Felix, successor to C++: http://felix.sf.net
>


-- 
Calvin: I try to make everyone's day a little more
surreal.

(From Calvin & Hobbes)


  reply	other threads:[~2007-07-30  8:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-30  6:45 skaller
2007-07-30  7:03 ` [Caml-list] " Benedikt Grundmann
2007-07-30  7:55   ` skaller
2007-07-30  8:02     ` Benedikt Grundmann [this message]
2007-07-30  8:16       ` skaller
2007-07-30 16:43     ` Christopher L Conway
2007-07-30 17:13       ` skaller
2007-07-30 19:24         ` Jon Harrop

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=9b415f950707300102r47d62264g1d355cd42d08b1c1@mail.gmail.com \
    --to=benedikt-grundmann@web.de \
    --cc=caml-list@inria.fr \
    --cc=skaller@users.sourceforge.net \
    /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).