From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id C7D26BB81 for ; Mon, 3 Jan 2005 11:16:14 +0100 (CET) Received: from ptb-relay03.plus.net (ptb-relay03.plus.net [212.159.14.214]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j03AGE0P014764 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 3 Jan 2005 11:16:14 +0100 Received: from [80.229.56.224] (helo=chetara) by ptb-relay03.plus.net with esmtp (Exim) id 1ClPG0-000MNb-In for caml-list@yquem.inria.fr; Mon, 03 Jan 2005 10:16:12 +0000 From: Jon Harrop To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] string_of_polymorphic Date: Mon, 3 Jan 2005 10:18:47 +0000 User-Agent: KMail/1.6.2 References: <41D915E0.4030701@yahoo.it> In-Reply-To: <41D915E0.4030701@yahoo.it> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200501031018.47703.jon@jdh30.plus.com> X-Miltered: at concorde with ID 41D91B6E.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 wrote:01 run-time:01 hash:01 cheers:01 covert:98 ...:98 ...:98 polymorphic:01 polymorphic:01 constructor:01 top-level:02 hints:03 string:03 string:03 X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.0 X-Spam-Level: On Monday 03 January 2005 09:52, Luca Pascali wrote: > 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. Why do you want to do this? > ... > Thanks in advance to anyone for hints, or links, or wathever help you > can give me. I think the run-time representation of a polymorphic variants' value is a hash of its name and, therefore, cannot be mapped back onto a string in general. There may be something else you can do specifically for the top-level but I can't think what... Cheers, Jon.