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=1.0 required=5.0 tests=AWL,DNS_FROM_RFC_ABUSE autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 720A8BC37 for ; Wed, 29 Jul 2009 03:26:11 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AlgCAH5Cb0qACH+ThWdsb2JhbACaCAEBAQoLCgUVqnmHKYhPhBAF X-IronPort-AV: E=Sophos;i="4.43,285,1246831200"; d="scan'208";a="44076154" Received: from server-nat-4.cs.umd.edu (HELO bacon.cs.umd.edu) ([128.8.127.147]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 29 Jul 2009 03:25:41 +0200 X-CSD-MailScanner-Watermark: 1249435539.57924@JIGmh2jC6vLlgltgYWeRIw Received: from webmail.cs.umd.edu (newman.cs.umd.edu [172.24.0.4]) by bacon.cs.umd.edu (8.13.1/8.14.1) with ESMTP id n6T1PbQk030772 for ; Tue, 28 Jul 2009 21:25:37 -0400 Received: from 208.59.169.96 (SquirrelMail authenticated user elnatan) by webmail.cs.umd.edu with HTTP; Tue, 28 Jul 2009 21:25:37 -0400 (EDT) Message-ID: <1501.208.59.169.96.1248830737.squirrel@webmail.cs.umd.edu> Date: Tue, 28 Jul 2009 21:25:37 -0400 (EDT) Subject: Physical counterpart to Pervasives.compare? From: "Elnatan Reisner" To: caml-list@yquem.inria.fr User-Agent: SquirrelMail/1.4.10a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0 (bacon.cs.umd.edu [172.24.3.34]); Tue, 28 Jul 2009 21:25:37 -0400 (EDT) X-Spam: no; 0.00; pervasives:01 pervasives:01 annotations:01 polymorphic:01 int:01 int:01 let:03 let:03 structure:07 rather:08 i'm:09 magic:10 magic:10 obj:11 obj:11 Is there something that can complete this analogy: (=) is to (==) as Pervasives.compare is to ___? That is, is there a polymorphic total ordering with respect to *physical* entities, rather than to their structure? I'm afraid of getting into trouble with Obj.magic, but what would this do: let f (x:'a) (y:'a) = compare (Obj.magic x) (Obj.magic y) ? Or would annotations make any difference: let f (x:'a) (y:'a) = compare (Obj.magic x : int) (Obj.magic y : int) -Elnatan