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 1EE91BB81 for ; Thu, 23 Feb 2006 19:33:11 +0100 (CET) Received: from mail.physik.uni-muenchen.de (mail.physik.uni-muenchen.de [192.54.42.129]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id k1NIXAWY001990 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Thu, 23 Feb 2006 19:33:10 +0100 Received: from localhost (unknown [127.0.0.1]) by mail.physik.uni-muenchen.de (Postfix) with ESMTP id 37CBC2001C; Thu, 23 Feb 2006 19:33:10 +0100 (CET) Received: from mail.physik.uni-muenchen.de ([127.0.0.1]) by localhost (mail.physik.uni-muenchen.de [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 05719-01-92; Thu, 23 Feb 2006 19:33:10 +0100 (CET) Received: from mailhost.cip.physik.uni-muenchen.de (kaiser.cip.physik.uni-muenchen.de [141.84.136.1]) by mail.physik.uni-muenchen.de (Postfix) with ESMTP id 1BC412000B; Thu, 23 Feb 2006 19:33:10 +0100 (CET) Received: from aso.cip.physik.uni-muenchen.de (eiger.cip.physik.uni-muenchen.de [141.84.136.54]) by mailhost.cip.physik.uni-muenchen.de (Postfix) with ESMTP id B253526EDA; Thu, 23 Feb 2006 19:33:09 +0100 (CET) Received: by aso.cip.physik.uni-muenchen.de (Postfix, from userid 3092) id 71658C8671; Thu, 23 Feb 2006 19:33:09 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by aso.cip.physik.uni-muenchen.de (Postfix) with ESMTP id 610F7D06B2; Thu, 23 Feb 2006 19:33:09 +0100 (CET) Date: Thu, 23 Feb 2006 19:33:09 +0100 (CET) From: Thomas Fischbacher To: =?iso-8859-1?Q?Fr=E9d=E9ric_Gava?= Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] (int * int) <> int*int ? In-Reply-To: <006101c6389e$9bbbc440$1f570b50@mshome.net> Message-ID: References: <006101c6389e$9bbbc440$1f570b50@mshome.net> X-BOFH: Daemons did it MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: amavisd-new at physik.uni-muenchen.de X-Miltered: at nez-perce with ID 43FDFFE6.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 semantically:01 ocaml:01 parens:01 cip:98 cip:98 lambda:01 lambda:01 exception:01 constructor:01 constructor:01 int:01 int:01 debian:02 caml:02 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=SPF_FAIL autolearn=disabled version=3.0.3 > is anybody can semantically explain why this 2 types are differents ? They are implemented in a different way internally. This is one of the dark corners of OCaml. (To my understanding, a constructor can carry multiple arguments, but depending on whether you put the parens or not, the tuple will be folded into a multi-slot constructor, or the constructor will have a single slot, which is a tuple.) And yes, this *can* give you major headache if you first discover it when you try to raise a complex exception with sub-structure from within C code. We had this discussion earlier: http://groups.google.com/group/fa.caml/msg/86fb0679c8d11b1b?hl=en -- regards, tf@cip.physik.uni-muenchen.de (o_ Thomas Fischbacher - http://www.cip.physik.uni-muenchen.de/~tf //\ (lambda (n) ((lambda (p q r) (p p q r)) (lambda (g x y) V_/_ (if (= x 0) y (g g (- x 1) (* x y)))) n 1)) (Debian GNU)