Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.

[Caml-list] New library: Easy-format 0.9.0

Skip to first unread message

Martin Jambon

Jul 9, 2008, 1:56:15 PM7/9/08
Hi list,

I would like to announce a small library (a module in fact) that is meant
to make it easy to produce pretty-printed text:

The data to be printed goes through a tree that carries all the
information required for pretty-printing. After that, a single call to
Easy_format.Pretty.to_stdout (for instance) outputs the indented result.

There's a reasonably complete example at

Comments and suggestions for improvement are welcome.



Caml-list mailing list. Subscription management:
Beginner's list:
Bug reports:

Martin Jambon

Jul 13, 2008, 12:32:15 PM7/13/08
I've just released a richer version of Easy-format.
The main URL is still

It now offers the following additional features:

- Support for separators that stick to the next list item (e.g. "|")
- More wrapping options
- Added Custom kind of nodes for using Format directly or existing
- Support for markup and escaping, allowing to produce colorized output
(HTML, terminal, ...) without interfering with the computation of
line breaks and spacing.

Easy-format now takes advantage of most features of the Format module,
with the notable exception of tabulation boxes. I'd be curious so see any
interesting use of tabulation boxes.

This release has slight incompatibilities with version 0.9.0 which was
released earlier this week, simply because more options were added:

- Deprecated use of Easy_format.Param. Instead, inherit from
Easy_format.label or Easy_format.atom.
- Atom nodes have now one additional argument for parameters.
- All record types have been extended with more fields.
Using the "with" mechanism for inheritance is the best way of limiting
future incompatibilities.



0 new messages