From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by pauillac.inria.fr; Tue, 18 Oct 94 10:32:58 +0100 Received: by pauillac.inria.fr; Tue, 18 Oct 94 10:32:12 +0100 From: Pierre Weis 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) X-Mailer: ELM [version 2.4 PL21] Content-Type: text/plain Sender: weis@pauillac.inria.fr 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.