From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 20D9BBC69 for ; Tue, 30 Jan 2007 09:17:23 +0100 (CET) Received: from net.univ-savoie.fr (net.univ-savoie.fr [193.48.120.75]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l0U8HLbg027586 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Tue, 30 Jan 2007 09:17:22 +0100 Received: from post.bourget.univ-savoie.fr (post.bourget.univ-savoie.fr [193.48.120.73]) by net.univ-savoie.fr (8.12.3/jtpda-5.4) with ESMTP id l0U8HDGX010088 ; Tue, 30 Jan 2007 09:17:13 +0100 Received: from [193.48.123.45] (d45.lama.univ-savoie.fr [193.48.123.45]) by post.bourget.univ-savoie.fr (8.12.3/jtpda-5.4) with ESMTP id l0U8HDUZ021105 ; Tue, 30 Jan 2007 09:17:14 +0100 Message-ID: <45BEFF01.6080702@univ-savoie.fr> Date: Tue, 30 Jan 2007 09:17:05 +0100 From: Christophe Raffalli User-Agent: Thunderbird 1.5.0.9 (X11/20070103) MIME-Version: 1.0 To: Gerd Stolpmann Cc: Simon Frost , Caml List Subject: Re: [Caml-list] Equality of functional values References: <1170104645.4564.304.camel@penguin.local> <1170107988.6952.13.camel@localhost.localdomain> In-Reply-To: <1170107988.6952.13.camel@localhost.localdomain> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.33 (www . roaringpenguin . com / mimedefang) X-Miltered: at discorde with ID 45BEFF11.003 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; christophe:01 raffalli:01 christophe:01 raffalli:01 univ-savoie:01 gerd:01 stolpmann:01 ocaml:01 ocaml:01 marshalling:01 intentional:01 chablais:01 73376:01 univ-savoie:01 equality:01 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 ---------------------------------------------