English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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: 2003-12-31 (22:00)
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";


Tom Hawkins
Launchbird Design Systems, Inc.

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