caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Printf.sprintf "%a"
@ 2016-07-08  8:01 Rodolphe Lepigre
  2016-07-08  8:08 ` Nicolas Ojeda Bar
  0 siblings, 1 reply; 5+ messages in thread
From: Rodolphe Lepigre @ 2016-07-08  8:01 UTC (permalink / raw)
  To: caml-list

Dear list,

If I define two values

  val p : type out_channel -> blop -> unit
  val e : blop

then I can do something like

  Printf.printf "%a" p e

but I can't find a way to do something like

  Printf.sprintf "%a" p e

which is not well-typed. Is there any trick that I can use to avoid
changing the type of [p] to [blop -> string]?

Cheers,

Rodolphe
-- 
Rodolphe Lepigre
LAMA, Université Savoie Mont Blanc, FRANCE
http://lama.univ-smb.fr/~lepigre/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-07-09  7:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-08  8:01 [Caml-list] Printf.sprintf "%a" Rodolphe Lepigre
2016-07-08  8:08 ` Nicolas Ojeda Bar
2016-07-08  8:16   ` Rodolphe Lepigre
2016-07-08 10:53     ` Gabriel Scherer
2016-07-09  7:26       ` Jonathan Protzenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).