From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 699B7BB81 for ; Thu, 23 Feb 2006 19:33:27 +0100 (CET) Received: from ux9.sp.cs.cmu.edu (UX9.SP.CS.CMU.EDU [128.2.220.166]) by concorde.inria.fr (8.13.0/8.13.0) with SMTP id k1NIXQKT015196 for ; Thu, 23 Feb 2006 19:33:27 +0100 Received: from c-24-3-154-200.hsd1.pa.comcast.net ([24.3.154.200]) by ux9.sp.cs.cmu.edu id aa22918; 23 Feb 2006 13:33 EST Received: from ecc by stratocaster.home with local (Exim 4.60) (envelope-from ) id 1FCLH0-0004XO-EO for caml-list@yquem.inria.fr; Thu, 23 Feb 2006 13:33:06 -0500 Date: Thu, 23 Feb 2006 13:33:06 -0500 To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] (int * int) <> int*int ? Message-ID: <20060223183306.GA17390@localhost> Mail-Followup-To: caml-list@yquem.inria.fr References: <006101c6389e$9bbbc440$1f570b50@mshome.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <006101c6389e$9bbbc440$1f570b50@mshome.net> User-Agent: Mutt/1.5.11+cvs20060126 From: Eric Cooper X-Miltered: at concorde with ID 43FDFFF6.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 gava:01 semantically:01 runtime:01 indirection:01 runtime:01 wrote:01 pair:01 pair:01 int:01 int:01 types:02 types:02 thu:05 restriction:05 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 On Thu, Feb 23, 2006 at 06:28:48PM +0100, Frdric Gava wrote: > is anybody can semantically explain why this 2 types are differents ? > > # type t=A of int*int and t'= B of (int*int);; > type t = A of int * int > and t' = B of (int * int) > [...] > I understand that it'is force you to have a pair for A and not just a value > of type pair but why this restriction ? It is not easy to explain why > int*int <> (int*int). See section 18.3.4 of the manual -- the distinction allows the runtime representation of t to avoid a level of indirection. And since the runtime representations are different, the types have to be different. -- Eric Cooper e c c @ c m u . e d u