From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=NO_REAL_NAME autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 5BFDCBB83 for ; Sun, 17 Sep 2006 14:43:47 +0200 (CEST) Received: from triton.rz.uni-saarland.de (triton.rz.uni-saarland.de [134.96.7.25]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id k8HChk7W007166 for ; Sun, 17 Sep 2006 14:43:47 +0200 Received: from uni-sb.de (uni-sb.de [134.96.7.230]) by triton.rz.uni-saarland.de (8.12.11.20060614/8.12.10) with ESMTP id k8HChj7E21121739; Sun, 17 Sep 2006 14:43:45 +0200 (CEST) Received: from mail.cs.uni-sb.de (mail.cs.uni-sb.de [134.96.254.200]) by uni-sb.de (8.13.8/2006081400) with ESMTP id k8HChjBS022414; Sun, 17 Sep 2006 14:43:45 +0200 (CEST) Received: from mail.ps.uni-sb.de (james.ps.uni-sb.de [134.96.186.68]) by mail.cs.uni-sb.de (8.13.8/2006081400) with ESMTP id k8HChiAo025613; Sun, 17 Sep 2006 14:43:44 +0200 (CEST) Received: from localhost ([127.0.0.1] helo=www.ps.uni-sb.de ident=www-data) by mail.ps.uni-sb.de with esmtp (Exim 4.50) id 1GOvzs-0005cS-1z; Sun, 17 Sep 2006 14:43:44 +0200 Received: from 72.254.55.251 (SquirrelMail authenticated user rossberg) by www.ps.uni-sb.de with HTTP; Sun, 17 Sep 2006 14:43:44 +0200 (CEST) Message-ID: <1932.72.254.55.251.1158497024.squirrel@www.ps.uni-sb.de> In-Reply-To: <1158486341.5405.11.camel@rosella.wigram> References: <20060913091435.537F4AC04@Adric.metnet.fnmoc.navy.mil> <1667.72.254.55.251.1158469700.squirrel@www.ps.uni-sb.de> <1158486341.5405.11.camel@rosella.wigram> Date: Sun, 17 Sep 2006 14:43:44 +0200 (CEST) From: rossberg@ps.uni-sb.de To: "skaller" Cc: caml-list@inria.fr User-Agent: SquirrelMail/1.4.4 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: rossberg@ps.uni-sb.de Subject: Re: [Caml-list] Improper generic equality in Caml (Rossberg's SML vs Caml) X-SA-Exim-Version: 4.2 (built Thu, 03 Mar 2005 10:44:12 +0100) X-SA-Exim-Scanned: Yes (on mail.ps.uni-sb.de) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-1.5.1 (triton.rz.uni-saarland.de [134.96.7.25]); Sun, 17 Sep 2006 14:43:45 +0200 (CEST) X-AntiVirus: checked by AntiVir Milter (version: 1.1.3-1; AVE: 7.2.0.16; VDF: 6.36.0.29; host: AntiVir1) X-Miltered: at concorde with ID 450D4302.007 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; rossberg:01 improper:01 sml:01 rossberg:01 sml:01 leibniz:01 statically:01 2006:98 equality:01 equality:01 wrote:01 wrote:01 abstract:01 abstract:01 caml-list:01 skaller wrote: > On Sun, 2006-09-17 at 07:08 +0200, rossberg@ps.uni-sb.de wrote: > >> This problem can sometimes make translation from SML (which has Leibniz >> equality) > > It does? I'm curious how it handles > > (a) functions > (b) abstract types By statically ruling out the use of generic equality on them. That's the purpose of eqtypes in SML. For the latter, the implementor of the abstract type can choose to allow generic equality if the abstract equality coincides with representational equality. Of course, this solution comes with its own set of problems... Btw, SML'97 even goes as far as disallowing the use of generic equality on floats, because IEEE equality does not meet the requirements. You have to use a special operator Real.== to compare them. - Andreas