Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Camlp4: varargs ie a la Printf
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-06-17 (14:59)
From: Alain Frisch <frisch@c...>
Subject: Re: [Caml-list] Camlp4: varargs ie a la Printf
On Mon, 17 Jun 2002, Basile STARYNKEVITCH wrote:

> My problem is to produce a quotation of a list of expressions (and not
> a quotation of a list expression). What should I put in place of the
> comment WHAT SHOULD BE ADDED HERE?   trace FOO "i=%d x=%g" i x end

I'm not sure to understand how this is more difficult than the solution
with Printf.kprintf; in both case, you want to generate a 'varargs'
application, right ?  Or what is a "list of expressions" ?

Try something like:

List.fold_left (fun e_1 e_2 -> <:expr< $e_1$ $e_2$ >>)

-- Alain

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: