From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id DF308BC57 for ; Mon, 20 Sep 2010 17:00:02 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvoEAGITl0xQW+UMgWdsb2JhbACTcjGNcxUBARYiIsFYhUEEhQSFNA X-IronPort-AV: E=Sophos;i="4.56,394,1280700000"; d="scan'208";a="67978424" Received: from lo.gmane.org ([80.91.229.12]) by mail1-smtp-roc.national.inria.fr with ESMTP; 20 Sep 2010 17:00:02 +0200 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Oxhqb-0004xX-Eh for caml-list@inria.fr; Mon, 20 Sep 2010 17:00:01 +0200 Received: from avelizy-155-1-7-50.w83-199.abo.wanadoo.fr ([83.199.46.50]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 20 Sep 2010 17:00:01 +0200 Received: from sylvain by avelizy-155-1-7-50.w83-199.abo.wanadoo.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 20 Sep 2010 17:00:01 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: caml-list@inria.fr From: Sylvain Le Gall Subject: Re: How can I set a type parameter of Map.Make(X) ? Date: Mon, 20 Sep 2010 14:59:48 +0000 (UTC) Message-ID: References: <4C97714A.6050403@inria.fr> X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: avelizy-155-1-7-50.w83-199.abo.wanadoo.fr User-Agent: slrn/pre1.0.0-18 (Linux) X-Spam: no; 0.00; le-gall:01 browsed:01 trivial:01 ocaml:01 polymorphic:01 beginners:01 wrote:01 parameter:02 parameter:02 groups:02 module:03 module:03 identifier:04 trivially:05 inria:06 On 20-09-2010, Dumitru Potop-Butucaru 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