caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* string_of_polymorphic
@ 2005-01-03  9:52 Luca Pascali
  2005-01-03 10:18 ` [Caml-list] string_of_polymorphic Jon Harrop
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Luca Pascali @ 2005-01-03  9:52 UTC (permalink / raw)
  To: caml-list

Hi everyone and Happy 2005.

As the subject says, my aim is to write a function that is able to
covert into a string a generic polymorphic constructor, or at least its
name, without using patter matching.
Something like the operation that the ocaml toplevel already does:

# let a = `Hi;;
val a : [> `Hi ] = `Hi
-------------------^    I'd like to have this string

I tried using the Obj module, but I got only segmentation faults.
I know that the Obj module has not to be used, but what I want to write
will be placed into a library with a signature like this:

val string_of_polymorphic : [> `Dummy ] -> string

Thanks in advance to anyone for hints, or links, or wathever help you
can give me.

Luca

-- 
*********************************************************************
Luca Pascali
luca@barettadeit.com
asxcaml-guru@barettadeit.com

http://www.barettadeit.com/
Baretta DE&IT
A division of Baretta SRL

tel. 02 370 111 55
fax. 02 370 111 54

Our technology:
http://www.asxcaml.org/
http://www.freerp.org/


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-01-05 18:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-03  9:52 string_of_polymorphic Luca Pascali
2005-01-03 10:18 ` [Caml-list] string_of_polymorphic Jon Harrop
2005-01-03 11:01   ` Luca Pascali
     [not found]   ` <41D9211D.7060003@yahoo.it>
     [not found]     ` <200501031100.27306.jon@jdh30.plus.com>
2005-01-03 11:06       ` Luca Pascali
2005-01-03 16:27 ` pad
2005-01-05 18:17 ` Alex Baretta

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