[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Richard Jones <rich@a...> |
| Subject: | Re: [Caml-list] Printing values |
On Mon, Mar 14, 2005 at 08:25:20PM -0800, Christian Stork wrote: > This must be a dumb question, but I couldn't find an answer. > > How can I print values of my own data types in the default way, eg, as > the debugger or the toplevel does it? Is there a standard formatter > that I can use (or generate), or do I have to write a new formatter for > each data type? One solution is to use Std.dump in Extlib[1]. It's not (AFAIAA) available in any released version of Extlib, so you'd have to use the CVS version, or use the original standalone version from which it is derived: http://merjis.com/developers/dumper Rich. [1] http://ocaml-lib.sourceforge.net/ -- Richard Jones, CTO Merjis Ltd. Merjis - web marketing and technology - http://merjis.com Team Notepad - intranets and extranets for business - http://team-notepad.com