From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.0 required=5.0 tests=AWL,SPF_NEUTRAL autolearn=disabled version=3.1.3 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 A5A4DBC75 for ; Tue, 1 May 2007 14:16:36 +0200 (CEST) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.171]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l41CGase001285 for ; Tue, 1 May 2007 14:16:36 +0200 Received: by ug-out-1314.google.com with SMTP id k3so35163ugf for ; Tue, 01 May 2007 05:16:35 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:mime-version:content-transfer-encoding:message-id:content-type:to:from:subject:date:x-mailer; b=HumSuQeNECNoFPEtQwqLDJoEBy0qzmfBoi76WsisIEQT0OhywS2awYYhkBHsrt8x1V8CUKcuDKvoSX1lesWMuvjLkTG8GDT9YOoPtMbFT53i+RfPsHZSiy0UHPzreZmrovYSP5imNm5wQlnaVXksIPqJhaz7Z8A6CL5rl+hnrMw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:mime-version:content-transfer-encoding:message-id:content-type:to:from:subject:date:x-mailer; b=aEHdWPeOhELALErCJZMtXqkXDy1/znHXvhcuo3FGuJPaKJqVib32jTk4EZiRNG1ECKxnI8ZJw6tBUEAWUtyrR8tYSVRQuMhstpyfO2VPbVH2QINjwe5R8lp7Rhu6dXIBbNaN8rxNgi1P/CN2xXMNVKl1xCHIAD+ya6cFWtYRvjw= Received: by 10.82.185.12 with SMTP id i12mr13872471buf.1178021795740; Tue, 01 May 2007 05:16:35 -0700 (PDT) Received: from ?192.168.1.34? ( [83.52.237.136]) by mx.google.com with ESMTP id z34sm16840266ikz.2007.05.01.05.16.29; Tue, 01 May 2007 05:16:30 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v752.3) Content-Transfer-Encoding: 7bit Message-Id: Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed To: Caml List From: Joel Reymont Subject: camlp4 3.10: <:ctyp< ( $list:tys$ ) Date: Tue, 1 May 2007 13:16:27 +0100 X-Mailer: Apple Mail (2.752.3) X-j-chkmail-Score: MSGID : 46372FA4.000 on concorde : j-chkmail score : XXX : 5/20 1 0.000 -> 3 X-Miltered: at concorde with ID 46372FA4.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; camlp:01 ctyp:01 ctyp:01 camlp:01 parens:01 int:01 int:01 expression:02 ast:02 ast:02 match:02 suggestion:03 loc:03 loc:03 pattern:04 This is the old code: | <:ctyp< ( $list:tys$ ) >> -> tupl _loc (List.map aux tys) I figure it tries to match something like "int * int". Following Nicolas's suggestion I thought I would see what this expands to: camlp4of -str '<:ctyp< ( int * int ) >>' Ast.TyTup (_loc, Ast.TySta (_loc, Ast.TyId (_loc, Ast.IdLid (_loc, "int")), Ast.TyId (_loc, Ast.IdLid (_loc, "int")))) How do I work back from this to the right expression within parens in the original pattern above? I tried | <:ctyp< ( $tup:tys$ ) >> -> tupl _loc (List.map aux tys) but this produces ctyp instead of ctyp list so it's not suitable for the tupl. Thanks, Joel -- http://wagerlabs.com/