caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Richard Jones <rich@annexia.org>
To: Caml List <caml-list@inria.fr>
Subject: Re: [Caml-list] Printing values
Date: Tue, 15 Mar 2005 09:26:47 +0000	[thread overview]
Message-ID: <20050315092647.GB19351@furbychan.cocan.org> (raw)
In-Reply-To: <20050315042519.GA26681@anthony.ics.uci.edu>

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


  reply	other threads:[~2005-03-15  9:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-15  4:25 Christian Stork
2005-03-15  9:26 ` Richard Jones [this message]
2005-03-15 12:51 ` [Caml-list] " Yoann Padioleau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050315092647.GB19351@furbychan.cocan.org \
    --to=rich@annexia.org \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).