From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p5RFMqLi003117 for ; Mon, 27 Jun 2011 17:22:52 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhcCAHSfCE7RVaC2kGdsb2JhbAA8AQMSpz0IFAEBAQEJCQ0HFAQhiHSjY45khDqJIQEBAwaGKgSHLIpXjAs8gTqCOg X-IronPort-AV: E=Sophos;i="4.65,432,1304287200"; d="scan'208";a="102071248" Received: from mail-gy0-f182.google.com ([209.85.160.182]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 27 Jun 2011 17:22:46 +0200 Received: by gyf3 with SMTP id 3so2995380gyf.27 for ; Mon, 27 Jun 2011 08:22:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:from :date:x-google-sender-auth:message-id:subject:to:cc:content-type; bh=8y63bXiiV9MynSfmIuRQbwQiG6iAarDfGd+OUulcec0=; b=om1ZMxQdfcvnTKfC5tVb4//AAadIMBVlAhRfNSV4cafYWNf/1MXqTpLqgdN+ppUGNo 6+znerP+hE9TS9bR3YbZRHc4GiVgs0TJQpwWvDBGiJlEgdjGy5GbsJaQ5AkVD4ctR7se gAKlkR/oWYAc2wTwLNrWUjOZ/L/hhsdKXHH9U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; b=bJi/XJzE5hASVL1CV3E+FTG4oy2hdql670oObUJ1njDvnKr+HMcTM1TA/edpnkx1XQ DKMLFViS8uCEhTGeQHg5YpFkN+EbVum4601FEsJMFmlgjZcki0B7WPMTJdVA8Yb1RKz7 AJ4gofcu4v9kkCior7rDTyQJHmdZrEVQJnzdY= Received: by 10.101.145.37 with SMTP id x37mr7098145ann.22.1309188165115; Mon, 27 Jun 2011 08:22:45 -0700 (PDT) MIME-Version: 1.0 Sender: xavier.leroy@gmail.com Received: by 10.100.57.4 with HTTP; Mon, 27 Jun 2011 08:22:25 -0700 (PDT) In-Reply-To: <4AEC4555-7685-4156-AEAE-062B64803556@inria.fr> References: <0EC5BE6E-FBB1-4B89-8362-5F9005AE7B84@inria.fr> <305A0394-9E08-4347-8320-BB5F5EFAF363@gmail.com> <4E085B9B.1020502@glondu.net> <4AEC4555-7685-4156-AEAE-062B64803556@inria.fr> From: Xavier Leroy Date: Mon, 27 Jun 2011 08:22:25 -0700 X-Google-Sender-Auth: OHT0CFN0mmIRJu_Sob9VzUBkH2c Message-ID: To: xclerc Cc: caml users , Serge Ziryukin , Damien Doligez , =?ISO-8859-1?Q?St=E9phane_Glondu?= Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [Caml-list] OCaml 3.12.1 compatibility report 2011/6/27 xclerc : > The tests are failing because a try is made to compare two big arrays with different layouts. > It used to be accepted by the big array compare function, but now only big arrays with the > same kind and layout can be compared [1]. Technically, bigarrays that differ in kind or layout can still be compared safely (= without crashing), but in 3.12.1 and up they will never compare equal. This is really a corner case, because in classic Caml and not using Obj.repr nor Obj.magic, the two bigarrays being compared must have the same static type and therefore the same kind and layout. With first-class modules today, or GADTs tomorrow, it is possible to compare two values having different representation types. That's why polymorphic comparison in 3.12.1 was hardened so that it would behave better in this case. I'd be interested to understand why bin_prot ends up comparing bigarrays of different layouts: is this an oversight in the test suite or a strong requirement? - Xavier Leroy