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

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

3 views
Skip to first unread message

Martin Jambon

unread,
Jul 9, 2008, 1:56:15 PM7/9/08
to caml...@inria.fr
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:

http://martin.jambon.free.fr/easy-format.html

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

http://martin.jambon.free.fr/easy_format_example.html


Comments and suggestions for improvement are welcome.
Enjoy.


Martin

--
http://wink.com/profile/mjambon
http://mjambon.com/

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Martin Jambon

unread,
Jul 13, 2008, 12:32:15 PM7/13/08
to caml...@inria.fr
I've just released a richer version of Easy-format.
The main URL is still http://martin.jambon.free.fr/easy-format.html

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
pretty-printers
- 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.list,
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.


Martin

--
http://mjambon.com/
http://wink.com/profile/mjambon
http://ocamlhackers.ning.com/profile/MartinJambon

0 new messages