caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Sylvain Le Gall <sylvain@le-gall.net>
To: caml-list@inria.fr
Subject: Re: How can I set a type parameter of Map.Make(X) ?
Date: Mon, 20 Sep 2010 14:59:48 +0000 (UTC)	[thread overview]
Message-ID: <slrni9etn4.fmh.sylvain@gallu.homelinux.org> (raw)
In-Reply-To: <4C97714A.6050403@inria.fr>

On 20-09-2010, Dumitru Potop-Butucaru <dumitru.potop_butucaru@inria.fr> wrote:
>
> I'm certain most users here will consider the question trivially simple, 
> but I browsed the documentation without finding a solution.
>

There is an ocaml-beginner list, if you feel the question is trivial:
http://tech.groups.yahoo.com/group/ocaml_beginners/

> The question is quite general: Given a polymorphic definition like 
> Map.Make(X), where
> X is some module, how can I specialize its 'a type parameter, e.g. by 
> setting it to Y, so that
> I have maps from X to Y ?
>

module M = Map.Make(X)

type y_map = y M.t 

(* N.B. Y is syntactically incorrect for a type identifier, you need to
use y *)

Regards
Sylvain Le Gall


      parent reply	other threads:[~2010-09-20 15:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-20 14:35 Dumitru Potop-Butucaru
2010-09-20 14:57 ` [Caml-list] " Ashish Agarwal
2010-09-20 17:25   ` Dumitru Potop-Butucaru
2010-09-20 17:31     ` Ashish Agarwal
2010-09-20 17:58     ` Martin Jambon
2010-09-20 19:02       ` Dumitru Potop-Butucaru
2010-09-20 19:32         ` Ashish Agarwal
2010-09-20 19:35         ` code duplication (was Re: [Caml-list] How can I set a type parameter of Map.Make(X) ?) Martin Jambon
2010-09-20 14:59 ` Sylvain Le Gall [this message]

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=slrni9etn4.fmh.sylvain@gallu.homelinux.org \
    --to=sylvain@le-gall.net \
    --cc=caml-list@inria.fr \
    /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).