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 40FECBB81 for ; Thu, 23 Feb 2006 20:41:12 +0100 (CET) Received: from smtp6.wanadoo.fr (smtp6.wanadoo.fr [193.252.22.25]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id k1NJfBCC008594 for ; Thu, 23 Feb 2006 20:41:12 +0100 Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf0609.wanadoo.fr (SMTP Server) with ESMTP id DB5672400122 for ; Thu, 23 Feb 2006 20:41:11 +0100 (CET) Received: from nono (ARouen-106-1-3-31.w80-11.abo.wanadoo.fr [80.11.87.31]) by mwinf0609.wanadoo.fr (SMTP Server) with SMTP id 90E7F240012D for ; Thu, 23 Feb 2006 20:41:11 +0100 (CET) X-ME-UUID: 20060223194111593.90E7F240012D@mwinf0609.wanadoo.fr Message-ID: <00c201c638b1$b2b96860$1f570b50@mshome.net> From: =?iso-8859-1?Q?Fr=E9d=E9ric_Gava?= To: References: <006101c6389e$9bbbc440$1f570b50@mshome.net><20060223185624.GA26907@old.davidb.org> <00bd01c638b0$9eeefda0$1f570b50@mshome.net> Subject: Re: [Caml-list] (int * int) <> int*int ? Date: Thu, 23 Feb 2006 20:45:27 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Miltered: at nez-perce with ID 43FE0FD7.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; gava:01 gava:01 caml-list:01 12.:98 pair:01 int:01 int:01 tuple:02 tuple:02 match:02 frederic:03 rebuild:03 pattern:03 concrete:06 fun:08 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.0 required=5.0 tests=RCVD_IN_NJABL_PROXY autolearn=disabled version=3.0.3 < For performance issues, is there a way to not have the rebuild > of the pair in > # type t = A of int*int | B of (int*int);; > # fun x -> match x with A (a,b) -> (a,b) | B a -> a;; > > ? Peraps this idea: if (all the time) A of (int*int) ==> A of int*int then in pattern mathching "A a" the "a" is directly built as a tuple from the tuple of the concrete type (just a little modification of the tag). Is it not a good idea ;-) ? Best, FG