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.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id BEA6DBBAF for ; Wed, 8 Jul 2009 20:54:18 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsACACeIVEqAAtnEmWdsb2JhbACBUZc/AQEBAQEICwoHE6cEiEaITIQIBQ X-IronPort-AV: E=Sophos;i="4.42,369,1243807200"; d="scan'208";a="29494782" Received: from smtp01.srv.cs.cmu.edu ([128.2.217.196]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 08 Jul 2009 20:54:18 +0200 Received: from stratocaster.home (pool-173-75-38-245.pitbpa.fios.verizon.net [173.75.38.245]) (authenticated bits=0) by smtp01.srv.cs.cmu.edu (8.13.6/8.13.6) with ESMTP id n68IsFRn022251 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Wed, 8 Jul 2009 14:54:16 -0400 (EDT) Received: from ecc by stratocaster.home with local (Exim 4.69) (envelope-from ) id 1MOcHX-00034z-O1 for caml-list@yquem.inria.fr; Wed, 08 Jul 2009 14:54:15 -0400 Date: Wed, 8 Jul 2009 14:54:15 -0400 From: Eric Cooper To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Representation of different polymorphic variants guaranteed to be different? Message-ID: <20090708185415.GB11681@localhost> Mail-Followup-To: caml-list@yquem.inria.fr References: <20090708183527.GC3432@colinux> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090708183527.GC3432@colinux> User-Agent: Mutt/1.5.20 (2009-06-14) X-Scanned-By: mimedefang-cmuscs on 128.2.217.196 X-Spam: no; 0.00; variants:01 0200,:01 variants:01 translated:01 2009:98 870:98 polymorphic:01 polymorphic:01 wrote:01 caml-list:01 caml-list:01 short:01 caml:02 bruno:03 pattern:04 On Wed, Jul 08, 2009 at 08:35:27PM +0200, Bruno Daniel wrote: > How is it ensured that I get a <> b for a and b created as > polymorphic variants from two different identifiers? Will pattern > matching give wrong results if I accidentally choose two different > identifiers translated to the same internal representation? See this thread: http://caml.inria.fr/pub/ml-archives/caml-list/2005/03/544288096a47d82ec870d01c8396f5fe.fr.html Short answer: collisions could theoretically occur, but are detected at link time. -- Eric Cooper e c c @ c m u . e d u