From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 83035BC29 for ; Sat, 6 Nov 2004 12:24:42 +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 iA6BOgQw008328 for ; Sat, 6 Nov 2004 12:24:42 +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 MAA04411 for ; Sat, 6 Nov 2004 12:24:41 +0100 (MET) Received: from blaster.systems.pipex.net (blaster.systems.pipex.net [62.241.163.7]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id iA6BOfUS008325 for ; Sat, 6 Nov 2004 12:24:41 +0100 Received: from draco.dyndns.org (81-178-114-156.dsl.pipex.com [81.178.114.156]) by blaster.systems.pipex.net (Postfix) with ESMTP id 34FFBE000218 for ; Sat, 6 Nov 2004 11:24:41 +0000 (GMT) Received: from jim by draco.dyndns.org with local (Exim 4.42) id 1CQOXT-00075l-3z for caml-list@inria.fr; Sat, 06 Nov 2004 11:15:23 +0000 Date: Sat, 6 Nov 2004 11:15:23 +0000 From: Jim To: caml-list Subject: Re: [Caml-list] Print values like the toplevel's printer Message-ID: <20041106111523.GB24365@draco.skynet> References: <200411051323.13339.wolfgang.mueller2@uni-bayreuth.de> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <200411051323.13339.wolfgang.mueller2@uni-bayreuth.de> X-Mail-Key: JimbosMagicMailKey X-Miltered: at nez-perce with ID 418CB47A.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 418CB479.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 toplevel's:01 wrote:01 toplevel's:01 o'caml:01 generics:01 generics:01 muller:01 short:01 functions:01 int:01 wolfgang:02 output:02 output:02 types:02 X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on yquem.inria.fr X-Spam-Status: No, score=0.1 required=5.0 tests=FORGED_RCVD_HELO autolearn=disabled version=3.0.0 X-Spam-Level: On Fri, Nov 05, 2004 at 01:23:13PM +0100, Wolfgang M=FCller wrote: > I would like to print values to a file in a human-readable manner without= =20 > having to compose the output writers of print_int and friends. In short, = I=20 > would like to use the toplevel's function for screen output of structured= =20 > values. >=20 > Is there a simple way, a FM or a mailing list you can point me to? >=20 > I googled quite a bit, but apparently not with the right terms. Aside from clever uses of various bits of the top level, you can also use camlp4 to automatically generate print functions for types. I think there is an example in the camlp4 manual. What we really need is generics. I thought there was a post in the mailing list some time ago saying that generics was going to be appear in O'Caml at some point, but I haven't seen anything for a long time. Does anyone know if it is still planned? Regards, Jim