From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by pauillac.inria.fr; Mon, 28 Mar 94 19:21:08 +0200 Received: from margaux.inria.fr by pauillac.inria.fr; Mon, 28 Mar 94 14:38:16 +0200 Received: from naima.inria.fr by margaux.inria.fr, Mon, 28 Mar 94 14:38:13 +0200 Received: by naima.inria.fr; Mon, 28 Mar 1994 14:37:54 +0200 Date: Mon, 28 Mar 1994 14:37:54 +0200 From: Eric Dujardin Message-Id: <199403281237.AA12519@naima.inria.fr> Precedence: Bulk To: caml-list@margaux.inria.fr Subject: using sets Cc: dujardin@naima.inria.fr Sender: weis@pauillac.inria.fr Hello, I have defined the following type : type Lien = {A_lien : Noeud ref ; B_lien :Noeud ref };; and now I would like to use sets of "Liens". The trouble is that I don't know how to define a total order over references, to create the set with the "empty" function. I do not want to compare the values of the "Noeud" instances, as two distinct instances could have the same value. I could add an explicit "Identifier" field to my "Noeud" instances, but it seems that a "magic" function, that would for example take any reference as parameter and return an integer, would be more efficient. However, I have no idea how it could be written... Thanks for any help, Eric