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.4 required=5.0 tests=AWL,HTML_MESSAGE,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 mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id EAC94BC37 for ; Tue, 28 Jul 2009 13:38:12 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqwCADKAbkrRVdzZkGdsb2JhbACCJi6WdD8BAQEBCQkMBxMDqDePTQEFhAyBTQ X-IronPort-AV: E=Sophos;i="4.43,282,1246831200"; d="scan'208";a="31794543" Received: from mail-fx0-f217.google.com ([209.85.220.217]) by mail3-smtp-sop.national.inria.fr with ESMTP; 28 Jul 2009 13:38:12 +0200 Received: by fxm17 with SMTP id 17so2769230fxm.27 for ; Tue, 28 Jul 2009 04:38:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=D2PLAbdo1/w5PoV+Iap0TIpijetKyFZCQfck7Xd4XDA=; b=Adfilx/CeyWLUxNlDDzxLhnqtQU+d7zjtrDmFinGjVYa1pgZwJKvjLhW3HkzImTZbS 6FN0W3MnMSpDyW24qzrwfmEm8kMykurwiAUxd1snbOsVjcDxhRyDFveD7OV8wivi/nVd /sq8MLWBR/AJzTP5P7OQYNgDOYwS1aR0+vc8I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=FqVCAHH/bKlKWNAA3BIko8N3kqD0BTeuppaF/IisCywSqmBtZeCRZDEjKJrSKn0VeD ZDwXzZtv0Smc3AJrC8Yfh+aapg9LZKhTTS/L7pYcKcGjP9aV+vbIFJLBV25jG9FL1N7n 7TQ8jCpuh2o1xdWqkqfXub0rgptEjCCx01oWs= MIME-Version: 1.0 Received: by 10.103.223.1 with SMTP id a1mr3786401mur.102.1248781092269; Tue, 28 Jul 2009 04:38:12 -0700 (PDT) Date: Tue, 28 Jul 2009 13:38:12 +0200 Message-ID: <721f7f5a0907280438o479785efr3793f4d1dff5c1f4@mail.gmail.com> Subject: Camlp4 quotations for tuples From: Philippe Veber To: caml-list@yquem.inria.fr Content-Type: multipart/alternative; boundary=0016364175e7682eaa046fc28111 X-Spam: no; 0.00; camlp:01 camlp:01 ctyp:01 ctyp:01 tuples:01 accu:02 accu:02 tuple:02 tuple:02 quotations:03 types:05 types:05 fold:06 fold:06 tia:08 --0016364175e7682eaa046fc28111 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi list, Does someone know how to write a camlp4 quotation for types of the form 'a * 'b * 'c * 'd ... For now I could only obtain types of the form 'a * ('b * ('c * ('d * ... )...))), using a code similar to List.fold_right (fun x accu -> <:ctyp< $x$ * $accu$ >>) (List.tl tuple_types) (List.hd tuple_types) TIA, ph. --0016364175e7682eaa046fc28111 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi list,

Does someone know how to write a camlp4 quotation for types= of the form 'a * 'b * 'c * 'd ...=A0 For now I could only = obtain types of the form 'a * ('b * ('c * ('d * ... )...)))= , using a code similar to


=A0List.fold_ri= ght
=A0=A0 (fun x accu -> <:ctyp< $x$ * $accu$ &g= t;>)
=A0=A0 (List.tl tuple_t= ypes)
=A0=A0 (List.hd tuple_types)


TIA,
ph.

--0016364175e7682eaa046fc28111--