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=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 1143CBC6C for ; Mon, 3 Sep 2007 16:22:34 +0200 (CEST) Received: from furbychan.cocan.org (furbychan.cocan.org [80.68.91.176]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l83EMXZI029405 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Mon, 3 Sep 2007 16:22:33 +0200 Received: from rich by furbychan.cocan.org with local (Exim 3.35 #1 (Debian)) id 1ISCox-0000U6-00 for ; Mon, 03 Sep 2007 15:22:31 +0100 Date: Mon, 3 Sep 2007 15:22:31 +0100 To: caml-list@inria.fr Subject: camlp4 3.10.0 and Camlp4.PreCast.Ast.ident in tuples Message-ID: <20070903142230.GD21964@furbychan.cocan.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.9i From: Richard Jones X-Miltered: at discorde with ID 46DC18A9.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; camlp:01 camlp:01 ocaml:01 expr:01 expr:01 tuples:01 ident:01 ident:01 tuple:02 tuple:02 expression:02 ast:02 ast:02 match:02 match:02 This code used to work in OCaml 3.09, but not in 3.10. I don't really understand what's going on, but I want to build a tuple here, so I'm not sure how it could force me to use idents instead of exprs. let convert = (* Avoid generating a single-element tuple. *) match conversions with | [] -> <:expr< () >> | [a] -> <:expr< $a$ >> | conversions -> <:expr< ( $list:conversions$ ) >> in <--- <:expr< let rows = $expr$ in let original_query = $str:query$ in List.map ( fun row -> match row with [ $list$ -> $convert$ File "pa_pgsql.ml4", line 335, characters 18-29: This expression has type Camlp4.PreCast.Ast.expr list but is here used with type Camlp4.PreCast.Ast.ident list ("conversions" is a list of expr.) How is the Camlp4 3.10 manual progressing? Rich. -- Richard Jones Red Hat