Polymorphic comparison

Pierre Weis (weis@pauillac.inria.fr)
Tue, 18 Oct 1994 10:32:11 +0100 (MET)

From: Pierre Weis <weis@pauillac.inria.fr>
Message-Id: <9410180932.AA28209@pauillac.inria.fr>
Subject: Polymorphic comparison
To: caml-list@pauillac.inria.fr
Date: Tue, 18 Oct 1994 10:32:11 +0100 (MET)

To: caml-list@pauillac.inria.fr
Cc: John.Harrison@cl.cam.ac.uk
Subject: Polymorphic <<
Date: Mon, 17 Oct 94 16:10:57 +0100

Classic ML had a polymorphic test comparison "$<< : * -> ** -> bool"
(or in CAML parlance, "prefix << : 'a -> 'b -> bool"). This was claimed
to be substitutive w.r.t ML equality, i.e. if x = x' and y = y' then x
<< y iff x' << y' (I'm not sure about function types). Thus, unless
the implementation is globally hash-consed, it isn't just pointer comparison.

Anyway, though a bit of a hack, it's quite a handy thing to have around for
performing arbitrary canonicalizations. Does CAML Light have anything similar?

John.