Browse thread
Newbie question: OCaml equivalent of Haskell's show?
-
Antony Courtney
-
Richard Jones
- Jeremy Yallop
- Jon Harrop
-
Richard Jones
[
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: | Jeremy Yallop <jeremy.yallop@e...> |
| Subject: | Re: [Caml-list] Newbie question: OCaml equivalent of Haskell's show? |
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.