From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by pauillac.inria.fr; Mon, 21 Mar 94 17:16:14 +0100 Received: from concorde.inria.fr by pauillac.inria.fr; Sun, 20 Mar 94 16:24:55 +0100 Received: from swan.cl.cam.ac.uk (pp@swan.cl.cam.ac.uk [128.232.0.56]) by concorde.inria.fr (8.6.7/8.6.6) with ESMTP id QAA12638 for ; Sun, 20 Mar 1994 16:24:54 +0100 Received: from auk.cl.cam.ac.uk (user jrh (rfc931)) by swan.cl.cam.ac.uk with SMTP (PP-6.5) to cl; Sun, 20 Mar 1994 15:24:28 +0000 To: caml-list@pauillac.inria.fr Cc: John.Harrison@cl.cam.ac.uk Subject: Bug in equality testing? Date: Sun, 20 Mar 94 15:24:23 +0000 From: John Harrison Message-Id: <"swan.cl.cam.:202150:940320152434"@cl.cam.ac.uk> Sender: weis@pauillac.inria.fr Hi, I've come across the following, which unless I am being stupid looks like a bug. The program below produces (in 0.6): true; true; false John. P.S. Thanks for the interesting replies on hash-consing. I'm afraid I am likely to be pestering you with more questions about CAML soon. It's a great system! ********************************************** type Example = Var of string | App of string * Example list;; let DEST = fun (App p) -> p | (Var _) -> failwith "DEST";; let a = DEST(App("X",([]: Example list)));; let b = ("X",([]: Example list));; fst(a) = fst(b);; snd(a) = snd(b);; a = b;; **********************************************