caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Xavier Leroy <Xavier.Leroy@inria.fr>
To: xclerc <xavier.clerc@inria.fr>
Cc: "caml users" <caml-list@inria.fr>,
	"Serge Ziryukin" <ftrvxmtrx@gmail.com>,
	"Damien Doligez" <damien.doligez@inria.fr>,
	"Stéphane Glondu" <steph@glondu.net>
Subject: Re: [Caml-list] OCaml 3.12.1 compatibility report
Date: Mon, 27 Jun 2011 08:22:25 -0700	[thread overview]
Message-ID: <BANLkTin7Kk7ASVcMnCt4zOG7UfOPqAH=Ug@mail.gmail.com> (raw)
In-Reply-To: <4AEC4555-7685-4156-AEAE-062B64803556@inria.fr>

2011/6/27 xclerc <xavier.clerc@inria.fr>:

> 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

  parent reply	other threads:[~2011-06-27 15:22 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-16 15:01 Damien Doligez
2011-06-16 15:11 ` [Caml-list] " Sylvain Le Gall
2011-06-16 15:18 ` [Caml-list] " Stéphane Glondu
2011-06-16 15:33 ` Florent Ouchet
2011-06-16 17:46   ` Gerd Stolpmann
2011-06-27  9:31     ` Damien Doligez
2011-06-28  8:07       ` Florent Ouchet
2011-06-16 17:59 ` Serge Ziryukin
2011-06-27 10:29   ` Stéphane Glondu
2011-06-27 12:49     ` xclerc
2011-06-27 14:40       ` Till Varoquaux
2011-06-27 15:22       ` Xavier Leroy [this message]
2011-06-27 15:57         ` Markus Mottl
2011-06-28 16:52           ` Damien Doligez
2011-06-30 21:37             ` Markus Mottl
2011-07-04 11:45               ` xclerc

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='BANLkTin7Kk7ASVcMnCt4zOG7UfOPqAH=Ug@mail.gmail.com' \
    --to=xavier.leroy@inria.fr \
    --cc=caml-list@inria.fr \
    --cc=damien.doligez@inria.fr \
    --cc=ftrvxmtrx@gmail.com \
    --cc=steph@glondu.net \
    --cc=xavier.clerc@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).