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 nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 28E6DBB81 for ; Thu, 23 Feb 2006 20:03:46 +0100 (CET) Received: from out4.smtp.messagingengine.com (out4.smtp.messagingengine.com [66.111.4.28]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id k1NJ3jmt004989 for ; Thu, 23 Feb 2006 20:03:45 +0100 Received: from frontend1.internal (mysql-sessions.internal [10.202.2.149]) by frontend1.messagingengine.com (Postfix) with ESMTP id 215CDD36DF8; Thu, 23 Feb 2006 14:03:43 -0500 (EST) Received: from frontend2.messagingengine.com ([10.202.2.151]) by frontend1.internal (MEProxy); Thu, 23 Feb 2006 14:03:43 -0500 X-Sasl-enc: ic4lSQOAGcK721klblVj9hWstg5AbS4KUMo+t27D8oUM 1140721420 Received: from munge (burnham.ljcrf.edu [192.231.106.2]) by frontend2.messagingengine.com (Postfix) with ESMTP id 6FBDB58A0CF; Thu, 23 Feb 2006 14:03:40 -0500 (EST) Date: Thu, 23 Feb 2006 11:03:22 -0800 (PST) From: Martin Jambon X-X-Sender: martin@munge To: Eric Cooper Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] (int * int) <> int*int ? In-Reply-To: <20060223183306.GA17390@localhost> Message-ID: References: <006101c6389e$9bbbc440$1f570b50@mshome.net> <20060223183306.GA17390@localhost> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Miltered: at nez-perce with ID 43FE0711.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 syntax:01 howto:01 wrote:01 wrote:01 pair:01 pair:01 int:01 int:01 jambon:01 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=FORGED_RCVD_HELO autolearn=disabled version=3.0.3 On Thu, 23 Feb 2006, Eric Cooper wrote: > 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. See also how this issue is handled by the revised syntax: http://caml.inria.fr/pub/docs/manual-camlp4/manual007.html#toc24 Martin -- Martin Jambon, PhD http://martin.jambon.free.fr Visit http://wikiomics.org, the Bioinformatics Howto Wiki