From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 5C501BB81 for ; Mon, 3 Jan 2005 10:52:35 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j039qYCB027091 for ; Mon, 3 Jan 2005 10:52:35 +0100 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id KAA27278 for ; Mon, 3 Jan 2005 10:52:34 +0100 (MET) Received: from smtp005.mail.ukl.yahoo.com (smtp005.mail.ukl.yahoo.com [217.12.11.36]) by nez-perce.inria.fr (8.13.0/8.13.0) with SMTP id j039qYBF027086 for ; Mon, 3 Jan 2005 10:52:34 +0100 Received: from unknown (HELO ?10.0.0.115?) (pasckosky@213.255.109.130 with plain) by smtp005.mail.ukl.yahoo.com with SMTP; 3 Jan 2005 09:52:34 -0000 Message-ID: <41D915E0.4030701@yahoo.it> Date: Mon, 03 Jan 2005 10:52:32 +0100 From: Luca Pascali User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041007 Debian/1.7.3-5 X-Accept-Language: en MIME-Version: 1.0 To: caml-list@inria.fr Subject: string_of_polymorphic Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at nez-perce with ID 41D915E3.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 41D915E2.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; ocaml:01 toplevel:01 val:01 val:01 baretta:01 baretta:01 covert:98 polymorphic:01 polymorphic:01 constructor:01 segmentation:02 hints:03 string:03 string:03 module:03 X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on yquem.inria.fr X-Spam-Status: No, score=0.5 required=5.0 tests=FROM_ENDS_IN_NUMS autolearn=disabled version=3.0.0 X-Spam-Level: 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/