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 JAA32059; Wed, 7 Mar 2001 09:49:59 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id JAA32134 for ; Wed, 7 Mar 2001 09:49:58 +0100 (MET) Received: from shiva.jussieu.fr (shiva.jussieu.fr [134.157.0.129]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f278nwj23139; Wed, 7 Mar 2001 09:49:58 +0100 (MET) Received: from akasha.ijm.jussieu.fr (akasha.ijm.jussieu.fr [134.157.173.57]) by shiva.jussieu.fr (8.10.0/jtpda-5.3.3) with ESMTP id f278nvf15229 ; Wed, 7 Mar 2001 09:49:57 +0100 (CET) Received: (from andrieu@localhost) by akasha.ijm.jussieu.fr (8.9.3/8.9.3) id JAA20852; Wed, 7 Mar 2001 09:49:50 +0100 From: Olivier Andrieu MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <15013.63022.363394.271012@akasha.ijm.jussieu.fr> Date: Wed, 7 Mar 2001 09:49:50 +0100 To: Alan Schmitt Cc: caml-list@inria.fr, Juergen Pfitzenmaier Subject: Re: [Caml-list] Comparison of functional values In-Reply-To: <20010307062028.O7121@alan-schm1p.inria.fr> References: <15013.23546.425793.7568@akasha.ijm.jussieu.fr> <20010307062028.O7121@alan-schm1p.inria.fr> <200103062208.XAA13315@sunstroke.informatik.uni-tuebingen.de> X-Mailer: VM 6.90 under Emacs 20.7.1 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Alan Schmitt [Wednesday 7 March 2001] : > As stated in http://caml.inria.fr/ocaml/htmlman/manual031.html, != is > the negation of ==. Salut Alan ! I known. But to use the Set functor, you need a `compare' function of type ('a -> 'a -> int) whereas != and == have type ('a -> bool). So != does not seem very helpful here. What I meant actually, was a «physical compare». I found out that this (crude) C function works : value phys_comp(value a, value b) { if(ab) return Val_int(+1) ; else return Val_int(0); } Olivier ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr