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=0.1 required=5.0 tests=AWL 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 5EFC5BBAF for ; Tue, 20 Jan 2009 12:37:28 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AooBAGhGdUnCpx6wi2dsb2JhbACUBQEBAQoLChi3L4JLgyg X-IronPort-AV: E=Sophos;i="4.37,295,1231110000"; d="scan'208";a="21763737" Received: from smtpmin.univ-orleans.fr (HELO min.univ-orleans.fr) ([194.167.30.176]) by mail3-smtp-sop.national.inria.fr with ESMTP; 20 Jan 2009 12:37:27 +0100 Received: from smtps.univ-orleans.fr (localhost [127.0.0.1]) by min.univ-orleans.fr (Postfix) with ESMTP id 7008D12B522 for ; Tue, 20 Jan 2009 12:37:27 +0100 (CET) Received: from [192.168.0.1] (lau18-1-82-246-197-195.fbx.proxad.net [82.246.197.195]) by smtps.univ-orleans.fr (Postfix) with ESMTP id 8811F36E60 for ; Tue, 20 Jan 2009 12:37:28 +0100 (CET) Subject: Re: [Caml-list] Making a polymorphic type non-polymorphic to comply with original signature From: David Teller To: OCaml List In-Reply-To: References: <4975AEA2.6050901@inescporto.pt> Content-Type: text/plain; charset=UTF-8 Date: Tue, 20 Jan 2009 12:37:31 +0100 Message-Id: <1232451451.6272.71.camel@Blefuscu> Mime-Version: 1.0 X-Mailer: Evolution 2.12.1 Content-Transfer-Encoding: 8bit X-Spam: no; 0.00; univ-orleans:01 functor:01 hashtable:01 hashtable:01 existential:01 cheers:01 0100,:01 hashtbl:01 hashedtype:01 node:01 functor:01 univ-orleans:01 lifo:01 2009:98 acb:98 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. 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 > -- David Teller-Rajchenbach Security of Distributed Systems http://www.univ-orleans.fr/lifo/Members/David.Teller Latest News of French Research: System being liquidated. Researchers angry.