* camlp4 3.10.0 and Camlp4.PreCast.Ast.ident in tuples
@ 2007-09-03 14:22 Richard Jones
2007-09-03 14:58 ` [Caml-list] " Bruno De Fraine
0 siblings, 1 reply; 2+ messages in thread
From: Richard Jones @ 2007-09-03 14:22 UTC (permalink / raw)
To: caml-list
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Caml-list] camlp4 3.10.0 and Camlp4.PreCast.Ast.ident in tuples
2007-09-03 14:22 camlp4 3.10.0 and Camlp4.PreCast.Ast.ident in tuples Richard Jones
@ 2007-09-03 14:58 ` Bruno De Fraine
0 siblings, 0 replies; 2+ messages in thread
From: Bruno De Fraine @ 2007-09-03 14:58 UTC (permalink / raw)
To: Richard Jones; +Cc: caml-list
On 03 Sep 2007, at 16:22, Richard Jones wrote:
> let convert =
> (* Avoid generating a single-element tuple. *)
> match conversions with
> | [] -> <:expr< () >>
> | [a] -> <:expr< $a$ >>
> | conversions ->
> <:expr< ( $list:conversions$ ) >> in <---
I think this has been answered before. E.g. see this message and the
reply from Nicolas:
http://caml.inria.fr/pub/ml-archives/caml-list/
2007/04/6ed141fb8ef02d20b4a0589f11f7817b.en.html
Regards,
Bruno
--
Bruno De Fraine
Vrije Universiteit Brussel
Faculty of Applied Sciences, DINF - SSEL
Room 4K208, Pleinlaan 2, B-1050 Brussels
tel: +32 (0)2 629 29 75
fax: +32 (0)2 629 28 70
e-mail: Bruno.De.Fraine@vub.ac.be
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-09-03 14:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-03 14:22 camlp4 3.10.0 and Camlp4.PreCast.Ast.ident in tuples Richard Jones
2007-09-03 14:58 ` [Caml-list] " Bruno De Fraine
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox