Version française
Home     About     Download     Resources     Contact us    
Browse thread
Equality of functional values
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Christophe Raffalli <christophe.raffalli@u...>
Subject: Re: [Caml-list] Equality of functional values
Gerd Stolpmann a écrit :
> Am Montag, den 29.01.2007, 13:04 -0800 schrieb Simon Frost:
>> Dear Caml List,
>>
>> I'm trying to use a software package written in ocaml (IBAL), however,
>> it fails a test due to 'Fatal error: exception Invalid_argument("equal:
>> functional value"). It seems that equality isn't defined for functional
>> values in OCAML (although I'm not an expert), so I'm wondering what the
>> workaround is. This apparently worked fine in ocaml 3.04, but not in
>> later versions. I'm using ocaml 3.08.3, and I get this error message
>> both on Linux (SUSE 9.1 Profession, x86_64) and Windows XP (x86). Any
>> help would be greatly appreciated! I'd rather not have multiple versions
>> of ocaml floating around...
> 

You could test equality after Marshalling ? On closures, it should compare code address
and the values in the closure. This does not give extentionnal equality (which is impossible), but an
intentional equality which is sometimes meaningful. I am wondering why this is not the default
for = or at least why the is not a way to choose like in the marshall module.

-- 
Christophe Raffalli
Université de Savoie
Batiment Le Chablais, bureau 21
73376 Le Bourget-du-Lac Cedex

tél: (33) 4 79 75 81 03
fax: (33) 4 79 75 87 42
mail: Christophe.Raffalli@univ-savoie.fr
www: http://www.lama.univ-savoie.fr/~RAFFALLI
---------------------------------------------
IMPORTANT: this mail is signed using PGP/MIME
At least Enigmail/Mozilla, mutt or evolution
can check this signature. The public key is
stored on www.keyserver.net
---------------------------------------------