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.4 required=5.0 tests=AWL,DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST,HTML_MESSAGE autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 72C4DBC6C for ; Tue, 5 Feb 2008 17:57:17 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAALMjqEfAXQInh2dsb2JhbACCPDSNPAEBAQgKKZ0F X-IronPort-AV: E=Sophos;i="4.25,308,1199660400"; d="scan'208,217";a="8793870" Received: from concorde.inria.fr ([192.93.2.39]) by mail3-smtp-sop.national.inria.fr with ESMTP; 05 Feb 2008 17:57:17 +0100 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id m15GvGir014738 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Tue, 5 Feb 2008 17:57:16 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAACskqEdQDPJhimdsb2JhbACCPDSNPAEBAQgEBgcKEQedBg X-IronPort-AV: E=Sophos;i="4.25,308,1199660400"; d="scan'208,217";a="7641505" Received: from smtp23.orange.fr ([80.12.242.97]) by mail1-smtp-roc.national.inria.fr with ESMTP; 05 Feb 2008 17:57:16 +0100 Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf2354.orange.fr (SMTP Server) with ESMTP id CE4167000EA9 for ; Tue, 5 Feb 2008 17:57:15 +0100 (CET) Received: from Thinkpad-R60 (Mix-Lyon-303-4-15.w193-248.abo.wanadoo.fr [193.248.106.15]) by mwinf2354.orange.fr (SMTP Server) with SMTP id DE06A7000C0E; Tue, 5 Feb 2008 17:57:14 +0100 (CET) X-ME-UUID: 20080205165714909.DE06A7000C0E@mwinf2354.orange.fr Date: Tue, 5 Feb 2008 17:59:50 +0100 From: "Damien Guichard" To: "Damien Guichard" , "Liste de diffusion OCaml" Subject: Re: [Caml-list] Variants & structural ordering X-mailer: Foxmail 5.0 [-fr-] Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=====003_Dragon831413644783_=====" Message-Id: <20080205165714.DE06A7000C0E@mwinf2354.orange.fr> X-Miltered: at concorde with ID 47A8956C.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; damien:01 guichard:01 variants:01 integers:01 variants:01 enumeration:01 ocaml:01 algebra:01 enumeration:01 damien:01 integers:01 ocaml:01 algebra:01 caml-list:01 artificial:01 This is a multi-part message in MIME format. --=====003_Dragon831413644783_===== Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Thanks to all for your answers. I am aware my code exemple is quite artificial, certainly integers are simpler in this particular case. My more profound question was: are variants treated as an enumeration or not ? And the answer is: OCaml variants are certainly treated as an initial algebra, but not exactly as an enumeration, thus their relative order is not meaningfull to the compare function. And it will not change in near future. Ok, i can live with that. - damien --=====003_Dragon831413644783_===== Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: 7bit
 
Thanks to all for your answers.
 
I am aware my code exemple is quite artificial, certainly integers are simpler in this particular case.
 
My more profound question was: are variants treated as an enumeration or not ?
And the answer is: OCaml variants are certainly treated as an initial algebra, but not exactly as an enumeration, thus their relative order is not meaningfull to the compare function.
And it will not change in near future.
 
Ok, i can live with that.
 
- damien
--=====003_Dragon831413644783_=====--