* Printing values
@ 2005-03-15 4:25 Christian Stork
2005-03-15 9:26 ` [Caml-list] " Richard Jones
2005-03-15 12:51 ` Yoann Padioleau
0 siblings, 2 replies; 3+ messages in thread
From: Christian Stork @ 2005-03-15 4:25 UTC (permalink / raw)
To: Caml List
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?
Thanks,
Chris
--
Chris Stork <> Support eff.org! <> http://www.ics.uci.edu/~cstork/
OpenPGP fingerprint: B08B 602C C806 C492 D069 021E 41F3 8C8D 50F9 CA2F
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Caml-list] Printing values
2005-03-15 4:25 Printing values Christian Stork
@ 2005-03-15 9:26 ` Richard Jones
2005-03-15 12:51 ` Yoann Padioleau
1 sibling, 0 replies; 3+ messages in thread
From: Richard Jones @ 2005-03-15 9:26 UTC (permalink / raw)
To: Caml List
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Caml-list] Printing values
2005-03-15 4:25 Printing values Christian Stork
2005-03-15 9:26 ` [Caml-list] " Richard Jones
@ 2005-03-15 12:51 ` Yoann Padioleau
1 sibling, 0 replies; 3+ messages in thread
From: Yoann Padioleau @ 2005-03-15 12:51 UTC (permalink / raw)
To: Christian Stork; +Cc: Caml List
Christian Stork <cstork@ics.uci.edu> writes:
> 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?
you can try this:
http://www.irisa.fr/prive/padiolea/hacks/generic_print.ml
or this (better):
http://www.seedwiki.com/wiki/shifting_focus/tywith
>
> Thanks,
> Chris
--
Yoann Padioleau, INSA de Rennes, France www.irisa.fr/prive/padiolea/
Opinions expressed here are only mine. Je n'écris qu'à titre personnel.
**____ Get Free. Be Smart. Simply use Linux and Free Software. ____**
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-03-15 12:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-15 4:25 Printing values Christian Stork
2005-03-15 9:26 ` [Caml-list] " Richard Jones
2005-03-15 12:51 ` Yoann Padioleau
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox