Version française
Home     About     Download     Resources     Contact us    
Browse thread
Newbie question: OCaml equivalent of Haskell's show?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ 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.