From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id WAA06159; Mon, 20 Sep 2004 22:15:27 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id WAA03031 for ; Mon, 20 Sep 2004 22:15:26 +0200 (MET DST) Received: from mail1.bluewin.ch (mail1.bluewin.ch [195.186.1.74]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id i8KKFP9G024896 for ; Mon, 20 Sep 2004 22:15:25 +0200 Received: from [10.0.1.2] (83.77.232.20) by mail1.bluewin.ch (Bluewin AG 7.0.030.2) id 4147080C000C6D6C for caml-list@inria.fr; Mon, 20 Sep 2004 20:15:25 +0000 Mime-Version: 1.0 (Apple Message framework v619) In-Reply-To: <1095694982.2580.595.camel@pelican.wigram> References: <1095516867.2580.211.camel@pelican.wigram> <16718.50690.954027.644373@gargle.gargle.HOWL> <1095694982.2580.595.camel@pelican.wigram> Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: =?ISO-8859-1?Q?Daniel_B=FCnzli?= Subject: Re: [Caml-list] type var in functor instance? Date: Mon, 20 Sep 2004 22:15:26 +0200 To: caml-list X-Mailer: Apple Mail (2.619) X-Miltered: at concorde with ID 414F3A5D.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 functor:01 hashtbl:01 hashtbl:01 hashedtype:01 equality:01 equality:01 polymorphic:01 match:02 precisely:02 variable:03 let:04 epfl:05 hints:06 daniel:06 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hello, Accidentally I'm running into the same problem. I'd like to have a polymorphic Hashtbl that uses physical equality. Using Hashtbl.Make is not possible since the type t of the input signature HashedType has no variable. More precisely I would like to have a key with the following type type 'a 'b key = 'a option * 'b option and the following equal function, let equal k k' = match k, k' with | (Some x, y), (Some x', y') -> if x == x' then y = y' else false | _, _ -> k = k' which tests for physical equality when the first component of the key is "Some" in both keys. Any hints besides those already suggested ? Daniel ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners