From: Richard J. <ri...@an...> - 2005-02-08 09:16:23
|
On Mon, Feb 07, 2005 at 08:35:52PM +0100, Nicolas Cannasse wrote: > > Anyone interested in this, http://merjis.com/developers/dumper or > > similar functionality in extlib? My particular implementation is pure > > OCaml. (You might want to read the "Notes" section of that page > > first however) > > > > Rich. > > Nice ! > Since it's not big, I don't think it needs a module of its own. Why not > adding the to_string : 'a -> string or dump : 'a -> string value to the > ExtLib Std module ? Yes, good idea. Since I don't have access to ocaml-lib CVS, do you want to add it? The function is only about a page of code. I have a few ideas for extending it. For example, it would be nice to turn on/off list understanding (although the default for lists should probably be "on"). Something like: dump ~list:false ... If that were added, then one could also add detection and printing of hash tables and other complex structures. I'll get round to that later however. Rich. -- Richard Jones, CTO Merjis Ltd. Merjis - web marketing and technology - http://merjis.com Team Notepad - intranets and extranets for business - http://team-notepad.com |