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.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id C3D87BC6B for ; Sat, 4 Aug 2007 15:39:53 +0200 (CEST) Received: from ipmail01.adl2.internode.on.net (ipmail01.adl2.internode.on.net [203.16.214.140]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l74DdpKS008250 for ; Sat, 4 Aug 2007 15:39:52 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAI4etEZ5LGJp/2dsb2JhbAAN X-IronPort-AV: E=Sophos;i="4.19,220,1183300200"; d="scan'208";a="167059246" Received: from ppp121-44-98-105.lns10.syd6.internode.on.net (HELO [192.168.1.201]) ([121.44.98.105]) by ipmail01.adl2.internode.on.net with ESMTP; 04 Aug 2007 23:09:50 +0930 Subject: Re: [Caml-list] Sorted list From: skaller To: Philippe Wang Cc: tmp123@menta.net, ocaml ml In-Reply-To: <46B46FB3.3090606@philippewang.info> References: <46B4485B.7040406@menta.net> <46B454ED.700@philippewang.info> <1186226538.14440.105.camel@rosella.wigram> <46B46FB3.3090606@philippewang.info> Content-Type: text/plain Date: Sat, 04 Aug 2007 23:39:46 +1000 Message-Id: <1186234786.32211.7.camel@rosella.wigram> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 46B481A7.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; 0200,:01 0200,:01 mandates:01 ocaml:01 sourceforge:01 wrote:01 wrote:01 caml-list:01 constraint:01 manual:06 weak:06 function:08 john:08 felix:09 felix:09 On Sat, 2007-08-04 at 14:23 +0200, Philippe Wang wrote: > skaller wrote: > > On Sat, 2007-08-04 at 12:29 +0200, Philippe Wang wrote: > > > > You cannot do that! compare function must be a total order. > > > Why not ? > It works ! ... Or did I miss something ? Yes. Read the manual: the ordered type mandates a total order. Just because the Ocaml type system is too weak too represent this constraint does not remove your obligation to meet it. Whether or not it happens to work with the current implementation isn't relevant. -- John Skaller Felix, successor to C++: http://felix.sf.net