Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Invalid_argument("equal: abstract value")?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Tom Hawkins <tom@l...>
Subject: [Caml-list] Invalid_argument("equal: abstract value")?
I haven't seen this error before.  Can someone provide an explanation?

I've traced the problem down to a structural comparison (=) 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 = Big_int.zero_big_int = Big_int.unit_big_int in
  if a then print_string "true\n" else print_string "false\n";

Regards,
Tom

-- 
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