caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jeremy Yallop <jeremy.yallop@ed.ac.uk>
To: Richard Jones <rich@annexia.org>
Cc: Antony Courtney <antony.courtney@gmail.com>, caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Newbie question: OCaml equivalent of Haskell's show?
Date: Mon, 07 Jul 2008 20:08:41 +0100	[thread overview]
Message-ID: <487269B9.6020502@ed.ac.uk> (raw)
In-Reply-To: <20080706190203.GA16430@annexia.org>

Richard Jones wrote:
> On Sun, Jul 06, 2008 at 11:33:35AM -0400, Antony Courtney wrote:
>> I'm an experienced Haskell hacker trying OCaml for the first time.
>>
>> One thing I am desperately searching for but have been unable to find
>> is some direct runtime access to the string representation of
>> arbitrary OCaml values.
> 
>   http://code.google.com/p/deriving/

For what it's worth, with deriving you can obtain a string 
representation of your value (`v', say) like this:

    Show.show<float option array array> v

Jeremy.


  reply	other threads:[~2008-07-07 19:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-06 15:33 Antony Courtney
2008-07-06 19:02 ` [Caml-list] " Richard Jones
2008-07-07 19:08   ` Jeremy Yallop [this message]
2008-07-06 21:09 ` Jon Harrop

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=487269B9.6020502@ed.ac.uk \
    --to=jeremy.yallop@ed.ac.uk \
    --cc=antony.courtney@gmail.com \
    --cc=caml-list@yquem.inria.fr \
    --cc=rich@annexia.org \
    /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).