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 043D1BB81 for ; Fri, 24 Feb 2006 13:58:27 +0100 (CET) Received: from [128.93.8.130] (macadam.inria.fr [128.93.8.130]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id k1OCwQf7009518 for ; Fri, 24 Feb 2006 13:58:26 +0100 In-Reply-To: <009b01c638ac$6a57b0e0$1f570b50@mshome.net> References: <006101c6389e$9bbbc440$1f570b50@mshome.net> <20060223183306.GA17390@localhost> <009b01c638ac$6a57b0e0$1f570b50@mshome.net> Mime-Version: 1.0 (Apple Message framework v746.2) X-Priority: 3 Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed Message-Id: <16A0DC2D-113B-47DA-BA9B-4F6F04B04CE5@inria.fr> Content-Transfer-Encoding: quoted-printable From: Damien Doligez Subject: Re: [Caml-list] (int * int) <> int*int ? Date: Fri, 24 Feb 2006 13:59:01 +0100 To: caml-list X-Mailer: Apple Mail (2.746.2) X-Miltered: at nez-perce with ID 43FF02F2.002 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; damien:01 damien:01 caml-list:01 gava:01 ocaml:01 val:01 val:01 syntax:01 constructors:01 overloading:01 wrote:01 unbound:01 doligez:01 doligez:01 constructor: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.0 required=5.0 tests=none autolearn=disabled version=3.0.3 On Feb 23, 2006, at 20:07, Fr=E9d=E9ric Gava wrote: > Morever I think that int*int=3D(int*int) "everywhere" in ML... This is definitely not true. Consider the following example: $ ocaml Objective Caml version 3.09.2+dev4 (2006-02-09) # let int =3D 0;; val int : int =3D 0 # let t =3D [| 1 |];; val t : int array =3D [|1|] # t.(int*int);; - : int =3D 1 # t.int*int;; Unbound record field label int # This example is very similar to your problem. The substring "int*int" appears in your program, but it is not _by_itself_ a subexpression of =20= your program, so there is no reason why it should be equivalent to =20 "(int*int)". As Jacques said, what we have here is an unfortunate choice of syntax =20= for the declaration of n-ary constructors, combined with overloading of constructor applications, to n arguments or to one tuple argument. -- Damien