From: Richard Jones <rich@annexia.org>
To: caml-list@inria.fr
Subject: camlp4 3.10.0 and Camlp4.PreCast.Ast.ident in tuples
Date: Mon, 3 Sep 2007 15:22:31 +0100 [thread overview]
Message-ID: <20070903142230.GD21964@furbychan.cocan.org> (raw)
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
next reply other threads:[~2007-09-03 14:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-03 14:22 Richard Jones [this message]
2007-09-03 14:58 ` [Caml-list] " Bruno De Fraine
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070903142230.GD21964@furbychan.cocan.org \
--to=rich@annexia.org \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox