From: Jonathan Protzenko <jonathan.protzenko@gmail.com>
To: "Daniel Bünzli" <daniel.buenzli@erratique.ch>
Cc: caml-list@inria.fr, Francois Berenger <berenger@riken.jp>
Subject: Re: [Caml-list] isn't iksprintf missing in the stdlib?
Date: Thu, 26 Dec 2013 12:48:57 +0100 [thread overview]
Message-ID: <52BC17A9.7030404@gmail.com> (raw)
In-Reply-To: <13075CB0C05E4E8C99531155FB17C47B@erratique.ch>
Hi,
If I'm not mistaken, and assuming you're using -rectypes, you can write:
# let rec iksprintf k f = iksprintf;;
val iksprintf : 'b -> 'c -> 'a as 'a = <fun>
which is unifiable with the type of Printf.ksprintf
# if true then Printf.ksprintf else iksprintf;;
- : (string -> 'b) -> ('a, unit, string, 'b) format4 -> 'a as 'a = <fun>
Cheers,
~ jonathan
On Thu 26 Dec 2013 12:24:53 PM CET, Daniel Bünzli wrote:
>
>
> Le jeudi, 26 décembre 2013 à 08:59, Francois Berenger a écrit :
>
>> Cf. http://caml.inria.fr/pub/docs/manual-ocaml/libref/Printf.html
>>
>> Is it possible to write one out of the Printf module?
> Maybe not. But at least from the Format module using `Format.iksprintf` with `Format.std_formatter`.
>
> Best,
>
> Daniel
>
>
>
prev parent reply other threads:[~2013-12-26 11:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-26 7:59 Francois Berenger
2013-12-26 11:24 ` Daniel Bünzli
2013-12-26 11:48 ` Jonathan Protzenko [this message]
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=52BC17A9.7030404@gmail.com \
--to=jonathan.protzenko@gmail.com \
--cc=berenger@riken.jp \
--cc=caml-list@inria.fr \
--cc=daniel.buenzli@erratique.ch \
/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