Browse thread
Polymorphic comparison
- Pierre Weis
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| 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? John.