caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Gabriel Scherer <gabriel.scherer@gmail.com>
To: rixed@happyleptic.org
Cc: caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] [Ann] Zarith
Date: Thu, 18 Aug 2011 10:58:08 +0200	[thread overview]
Message-ID: <CAPFanBHyuEpJ4NE61Rdvq2A8PZ4Uuk-inUCXJHO-yrZFDmVtxQ@mail.gmail.com> (raw)
In-Reply-To: <20110818080254.GA10854@ccellier.rd.securactive.lan>

[-- Attachment #1: Type: text/plain, Size: 1034 bytes --]

On Thu, Aug 18, 2011 at 10:02 AM, <rixed@happyleptic.org> wrote:

> Is there anything special in 3.12.1 to help library authors define
> specialized comparison operators ?
>

Yes, from the 3.12.1 changelog:

> - Added new operation 'compare_ext' to custom blocks, called when
>  comparing a custom block value with an unboxed integer.
>

The  following fix is also possibly relevant:

> - Hardened generic comparison in the case where two custom blocks
>  are compared and have different sets of custom operations.


I believe the comparison hardening was made desirable by the expected use of
first-class modules to encode existential datatypes: with existential
datatypes you may try to use the polymorphic comparison operators on two
values of the same (existential) datatype having different internal
representations. The problem didn't happen with the previous encoding of
existential types using first-class polymorphism, as it implies packing the
value inside closures, so the polymorphic comparison operators were not
usable.

[-- Attachment #2: Type: text/html, Size: 1659 bytes --]

  parent reply	other threads:[~2011-08-18  8:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-18  7:34 Xavier Leroy
2011-08-18  8:02 ` rixed
2011-08-18  8:49   ` Gerd Stolpmann
2011-08-18  8:58   ` Gabriel Scherer [this message]
2011-08-18 10:42     ` Alain Frisch

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=CAPFanBHyuEpJ4NE61Rdvq2A8PZ4Uuk-inUCXJHO-yrZFDmVtxQ@mail.gmail.com \
    --to=gabriel.scherer@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=rixed@happyleptic.org \
    /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).