caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Extending Format strings
@ 2014-07-01  9:59 Gabriel Kerneis
  2014-07-01 14:15 ` Tianyi Cui
  2014-07-01 15:27 ` Jeremie Dimino
  0 siblings, 2 replies; 7+ messages in thread
From: Gabriel Kerneis @ 2014-07-01  9:59 UTC (permalink / raw)
  To: caml-list

Dear all,

in CIL <http://cil.sf.net>, the module Pretty provides a Format-like
interface with a few extensions compared to usual format strings.
Implementation-wise, it uses string_of_format and re-implements most of
the logic of the pre-4.02 Format module, with Obj.magic all over the
place.

I wondered if anyone has done something similar in their own project
(extending Format in one way or another), and if the new GADT-based
approach could provide a cleaner solution?

One thing I quite like with the current code, despite its uglyness, is
its concision. I am right in assuming that switching to GADTs would
require a lot more boilerplate?

Many thanks for any example you could provide.

With best regards,
-- 
Gabriel

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

end of thread, other threads:[~2014-07-02 13:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-01  9:59 [Caml-list] Extending Format strings Gabriel Kerneis
2014-07-01 14:15 ` Tianyi Cui
2014-07-01 14:39   ` Gabriel Kerneis
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

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).