From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.5 required=5.0 tests=AWL,SPF_SOFTFAIL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id BF2D5BBAF for ; Tue, 20 Jan 2009 12:46:45 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: At8AAMtIdUnVhjEYkWdsb2JhbACUBQEBAQEJCwoHEQO3N4JLgyg X-IronPort-AV: E=Sophos;i="4.37,295,1231110000"; d="scan'208";a="21764141" Received: from ihsmtp02voda.lis.interhost.com (HELO ihsmtp02cons.lis.interhost.com) ([213.134.49.24]) by mail3-smtp-sop.national.inria.fr with ESMTP; 20 Jan 2009 12:46:45 +0100 Received: from [192.168.1.64] ([77.54.249.136]) by ihsmtp02cons.lis.interhost.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 20 Jan 2009 11:44:07 +0000 Message-ID: <4975B9A4.7020609@inescporto.pt> Date: Tue, 20 Jan 2009 11:46:44 +0000 From: Hugo Ferreira User-Agent: Thunderbird 2.0.0.19 (X11/20090105) MIME-Version: 1.0 To: David Teller Cc: OCaml List Subject: Re: [Caml-list] Making a polymorphic type non-polymorphic to comply with original signature References: <4975AEA2.6050901@inescporto.pt> <1232451451.6272.71.camel@Blefuscu> In-Reply-To: <1232451451.6272.71.camel@Blefuscu> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-OriginalArrivalTime: 20 Jan 2009 11:44:07.0732 (UTC) FILETIME=[671CCF40:01C97AF4] X-Spam: no; 0.00; functor:01 hashtable:01 hashtable:01 existential:01 hashedtype:01 hashedtype:01 doable:01 cheers:01 0100,:01 hashtbl:01 node:01 functor:01 2009:98 acb:98 polymorphic:01 David Teller wrote: > It's probably feasible without copy & paste by building a functor on top > of the defunctorized hashtable in Batteries. Or by just using the > defunctorized hashtable of Batteries directly, although it's not as safe > as the functorized version, due to the absence of existential types. > If I understand you correctly I would have to redefine equivalents for: - HashedType - S - Make(H: HashedType) Basically copy & paste these and change the type. Doable although not to my liking. TIA, Hugo F. > Cheers, > David > > On Tue, 2009-01-20 at 12:24 +0100, Daniel Bünzli wrote: >> Le 20 janv. 09 à 11:59, Hugo Ferreira a écrit : >> >>> Is it possible to make H comply with Hashtbl.HashedType i.e: make >>> J.Key = 'a H.node ? >> This issue is well known (e.g. see here [1]). Your are running into >> limitations of the standard library. The only unsatisfying answer is >> to copy the code from the standard library and add the parameter >> yourself. >> >> Best, >> >> Daniel >> >> [1] http://groups.google.com/group/fa.caml/browse_thread/thread/f2acb593da91553c?hl=fr&ie=UTF-8&q=type+var+in+functor+fa.caml >> >> ____________________________________________ugs >>