English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Polymorphic comparison
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 1994-10-18 (09:32)
From: Pierre Weis <weis@p...>
Subject: Polymorphic comparison
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?