On Thu, Aug 18, 2011 at 10:02 AM, <[email protected]> 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.

-- 
Caml-list mailing list.  Subscription management and archives:
https://sympa-roc.inria.fr/wws/info/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Reply via email to