From: Gabriel Kerneis <gabriel@kerneis.info>
To: Tianyi Cui <tcui@janestreet.com>
Cc: OCaml Mailing List <caml-list@inria.fr>
Subject: Re: [Caml-list] Extending Format strings
Date: Tue, 01 Jul 2014 15:39:46 +0100 [thread overview]
Message-ID: <468a14a33d21f1ee3bdadbce329f9c7c@kerneis.info> (raw)
In-Reply-To: <CANgsapYP717mRx-V3BW2r3VE8TufTei00cNOoMqPgv0FrJKb3A@mail.gmail.com>
Le 2014-07-01 15:15, Tianyi Cui a écrit :
> I found https://github.com/janestreet/custom_printf [5] quite
> straightforward to understand and easy to use, if most of your types
> already have sexp converters and to_string functions.
Thanks. This is a nice hack (provided you are happy to use a
pre-processor). However, if I understand correctly, it is limited to
making %s and %a more convenient to use for existing Printf functions.
I should probably have given more details in my initial request. CIL's
Pretty.dprintf [1] constructs and returns a "document" (similar to
PPrint.document, if you are more familiar with this library), to be
later formated and rendered to a given width. I am not sure
custom_printf provides that level of flexibility.
[1]
http://kerneis.github.io/cil/doc/html/cil/api/Pretty.html#VALdprintf
Best,
--
Gabriel
next prev parent reply other threads:[~2014-07-01 14:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-01 9:59 Gabriel Kerneis
2014-07-01 14:15 ` Tianyi Cui
2014-07-01 14:39 ` Gabriel Kerneis [this message]
2014-07-01 15:27 ` Jeremie Dimino
2014-07-01 16:06 ` Alain Frisch
2014-07-02 9:27 ` Gabriel Kerneis
2014-07-02 13:34 ` Gabriel Scherer
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=468a14a33d21f1ee3bdadbce329f9c7c@kerneis.info \
--to=gabriel@kerneis.info \
--cc=caml-list@inria.fr \
--cc=tcui@janestreet.com \
/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