Version française
Home     About     Download     Resources     Contact us    
Browse thread
Polymorphic variant to string?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Chris Campbell <cyberdanx@g...>
Subject: Polymorphic variant to string?
Hi,

Is there a general method for converting polymorphic variants to
strings?  The method using camlp4 assumes the source is compiled with
it, which is not the case.  Basically I want to print a list of
variants if a unit tests fail, so we can see exactly the contents of
the list at that point.

The polymorphic variant type resides in a library and is used by a
module in my program.  I need to check the values returned match which
is easy, except when the code tested is erroneous and I want to see
what's going on.

Any ideas?  Suggestions?


Cheers,
Chris