From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id RAA16768; Thu, 21 Mar 2002 17:02:49 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id RAA08172 for ; Thu, 21 Mar 2002 17:02:48 +0100 (MET) Received: from penguin.housemarque.fi (www.housemarque.fi [212.213.160.98]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g2LG2lT16962 for ; Thu, 21 Mar 2002 17:02:47 +0100 (MET) Received: from rudolph.housemarque.fi ([192.168.42.2] helo=frodo ident=root) by penguin.housemarque.fi with smtp (Exim 3.00 #1) id 16o4ym-00071u-00 for caml-list@inria.fr; Thu, 21 Mar 2002 17:59:52 +0200 Message-ID: <009b01c1d0f2$83743a60$422aa8c0@housemarque.fi> From: "Vesa Karvonen" To: References: Subject: Re: [Caml-list] Bug in Hashtbl ? Date: Thu, 21 Mar 2002 18:07:34 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Thanks to everyone for the quick replies. From: "Alain Frisch" > On Thu, 21 Mar 2002, Vesa Karvonen wrote: > > > > The following program raises an Out_of_memory exception. Is this: > > - correct behavior, > > - bug in Ocaml 3.04, or > > - bug somewhere else? > > I would say "correct behavior"; the manual says, about generic > comparisons: > > Comparison between cyclic structures may not terminate. Yep, this seems to be the problem. It might be wise to specifically mention in the Hashtbl documentation that the functorial version is needed for cyclic structures. The Hashtbl.hash function documentation easily gices the wrong impression. > Note that it would be costly to implement exact (structural) comparison of > cyclic structures (with a coinductive definition). What you want is > probably to test for physical equality; you can use the functorial version > of hash tables to do that. The code is actually a stripped down version of a unit test, so it is not a problem to change to an acyclic representation. The application isn't using cyclic structures. Regards, Vesa Karvonen ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners