Browse thread
Maximum non-constant constructors
[
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: | Jon Harrop <jon@f...> |
| Subject: | Re: [Caml-list] Maximum non-constant constructors |
On Thursday 17 March 2005 14:00, Eric Cooper wrote: > For example, for all strings XXX, the variants `XXX and `zyctRecXXX > collide. So they do: # type a = [ `ABC | `zyctRecABC ];; Variant tags `ABC and `zyctRecABC have same hash value. Change one of them. # > My guess is that none of them are likely to be chosen by > humans, but might occur in program-generated code. Good point! I think this justifies the existence of a library function to compare the hashes of string names of polymorphic variants. Does such a function exist? -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. Objective CAML for Scientists http://www.ffconsultancy.com/products/ocaml_for_scientists