Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Printing values
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ 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



Richard Jones, CTO Merjis Ltd.
Merjis - web marketing and technology -
Team Notepad - intranets and extranets for business -