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 XAA25777; Wed, 31 Dec 2003 23:26:01 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id XAA25814 for ; Wed, 31 Dec 2003 23:26:00 +0100 (MET) Received: from glow.phpwebhosting.com (Hosting-132-76.PHPWebHosting.Com [64.72.132.76] (may be forged)) by nez-perce.inria.fr (8.11.1/8.11.1) with SMTP id hBVMPxv03105 for ; Wed, 31 Dec 2003 23:25:59 +0100 (MET) Received: (qmail 1916 invoked from network); 31 Dec 2003 22:25:54 -0000 Received: from unknown (HELO sparky) (24.163.168.219) by hosting-132-76.phpwebhosting.com with SMTP; 31 Dec 2003 22:25:54 -0000 Content-Type: text/plain; charset="iso-8859-1" From: Tom Hawkins Organization: Launchbird Design Systems, Inc. To: caml-list@inria.fr Subject: Re: [Caml-list] Invalid_argument("equal: abstract value")? Date: Wed, 31 Dec 2003 16:21:51 -0600 User-Agent: KMail/1.4.3 References: <200312311555.47555.tom@launchbird.com> In-Reply-To: <200312311555.47555.tom@launchbird.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200312311621.51555.tom@launchbird.com> X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 no-no:01 work-around:01 952:99 compiler:01 ints:01 int:01 int:01 reasoning:02 comparison:02 comparison:02 unit:03 unit:03 string:03 string:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Wednesday 31 December 2003 03:55 pm, Tom Hawkins wrote: > I haven't seen this error before. Can someone provide an > explanation? > > I've traced the problem down to a structural comparison (=3D) between > two large data structures. I know functional comparisons are a > no-no, but what is an "abstract value"? > > The problem occurred when I added big integers (Big_int.big_int) to > the data structures under comparison. Suspecting big ints can't be > structurally compared, I tried the following, but the compiler > printed "false" as I would normally expect: > > let a =3D Big_int.zero_big_int =3D Big_int.unit_big_int in > if a then print_string "true\n" else print_string "false\n"; Further suspecting Big_int.zero_big_int and Big_int.unit_big_int are=20 special cases, I tried: Big_int.big_int_of_string "123" =3D Big_int.big_int_of_string "456" Sure enough, 'Invalid_argument("equal: abstract value")'. So what's=20 the reasoning? (It's no big deal. I've already built a structural=20 comparison function for my problem as a work-around.) -Tom =20 --=20 Tom Hawkins Launchbird Design Systems, Inc. 952-200-3790 http://www.launchbird.com/ ------------------- 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