Browse thread
string_of_polymorphic
- Luca Pascali
[
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: | Luca Pascali <pasckosky2000@y...> |
| Subject: | string_of_polymorphic |
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/