From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id C15C2BC32 for ; Thu, 17 Mar 2005 18:54:27 +0100 (CET) Received: from ptb-relay03.plus.net (ptb-relay03.plus.net [212.159.14.214]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j2HHsRRV016848 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 17 Mar 2005 18:54:27 +0100 Received: from [80.229.56.224] (helo=chetara) by ptb-relay03.plus.net with esmtp (Exim) id 1DBzCT-000Ley-Ug for caml-list@yquem.inria.fr; Thu, 17 Mar 2005 17:54:26 +0000 From: Jon Harrop Organization: Flying Frog Consultancy Ltd. To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Maximum non-constant constructors Date: Thu, 17 Mar 2005 17:55:25 +0000 User-Agent: KMail/1.7.1 References: <42388E28.6050808@confluent.org> <16953.31187.263581.694769@gargle.gargle.HOWL> <20050317140034.GA7049@localhost> In-Reply-To: <20050317140034.GA7049@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200503171755.25927.jon@ffconsultancy.com> X-Miltered: at nez-perce with ID 4239C453.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 constructors:01 variants:01 hash:01 justifies:01 hashes:01 variants:01 ocaml:01 frog:98 wrote:01 polymorphic:01 strings:01 caml:02 variant:02 guess:02 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.2 X-Spam-Level: On Thursday 17 March 2005 14:00, Eric Cooper wrote: > For example, for all strings XXX, the variants `XXX and `zyctRecXXX > collide. So they do: # type a = [ `ABC | `zyctRecABC ];; Variant tags `ABC and `zyctRecABC have same hash value. Change one of them. # > My guess is that none of them are likely to be chosen by > humans, but might occur in program-generated code. Good point! I think this justifies the existence of a library function to compare the hashes of string names of polymorphic variants. Does such a function exist? -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. Objective CAML for Scientists http://www.ffconsultancy.com/products/ocaml_for_scientists