Hi list,
Wink.com is releasing a module called Dum for dumping data.
It derives from Dumper by Richard W Jones (now Std.dump in Extlib) and
from Size by Jean-Christophe Filliatre.
http://oss.wink.com/dum/
The main improvement over the original Dumper is that shared values
and therefore cycles are detected and labelled:
# let rec loopy = 1 :: 2 :: loopy in Dum.p loopy;;
- : string = "#0: (1 (2 #0))"
Dum was originally developed to print the maximum out of uncaught
exceptions, since the standard Printexc.to_string does not go arbitrarily
deep and this was occasionally a source of frustration.
Now data such as closure fields and object fields are dumped like regular
data without causing particular problems or worries.
The output is pretty-printed and its size limit is configurable.
Enjoy!
Martin, for Wink.
--
http://wink.com/