From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id pB89OYbn015102 for ; Thu, 8 Dec 2011 10:24:34 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ag8DAGOB4E7U4xEKk2dsb2JhbABDhDaWAZAtIgEBAQEJCQsJFAMigXIBAQQBDBtHCwULBQQCGA0hRRIGEwkIAYd1Aga2eoN3h0QEjHQTFQGZdQ X-IronPort-AV: E=Sophos;i="4.71,319,1320620400"; d="scan'208";a="134501361" Received: from moutng.kundenserver.de ([212.227.17.10]) by mail1-smtp-roc.national.inria.fr with ESMTP; 08 Dec 2011 10:24:30 +0100 Received: from office1.lan.sumadev.de (dslb-188-097-005-129.pools.arcor-ip.net [188.97.5.129]) by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis) id 0Lnnzv-1R7nmQ17Mt-00hXMu; Thu, 08 Dec 2011 10:24:25 +0100 Received: from gps.dynxs.de (localhost [127.0.0.1]) by office1.lan.sumadev.de (Postfix) with ESMTP id 97C05C00C7; Thu, 8 Dec 2011 10:24:24 +0100 (CET) Received: from 84.233.128.147 (SquirrelMail authenticated user gerd) by gps.dynxs.de with HTTP; Thu, 8 Dec 2011 10:24:25 +0100 Message-ID: <280dc1473314c10968af19341bde3186.squirrel@gps.dynxs.de> In-Reply-To: <4EE07CB7.6090106@frisch.fr> References: <1323271707.32238.17.camel@arrakis> <4EE02213.70200@gmail.com> <4EE07CB7.6090106@frisch.fr> Date: Thu, 8 Dec 2011 10:24:25 +0100 From: "Gerd Stolpmann" To: "Alain Frisch" Cc: "Edgar Friendly" , caml-list@inria.fr User-Agent: SquirrelMail/1.4.21 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 X-Priority: 3 (Normal) Importance: Normal X-Provags-ID: V02:K0:xh6wCKsAIl+Lfq2n5QxK/xlfoIgzUgp0qIp/AhVJIlV aTDQAEmGSQrPuRdfP/Qd6YkbylKO1MxgH12Kzela2odfZLvfjH IVl98bzAui/CYGgOuu6CsKD28+mKGdeOjp9kvQOz0TV4wPilyh 7qDZLgTwfNw3baQfaiKlyuUHu8nNi5rgKG+s97ZIFrqFzyHihX vF7MOX8bbBc/L4wLpsDeQeiPV66KT9lCbjl34SS8KMKWOnwWCJ ZVL81Pt0/zy0cSKep6awgAB/D3FrFwjQ4bjESl9bt+u7gShDqM Ik+knRlj+TYvp80Yi007BjJgJwG1+95zqbRfjaUyBO0SiBhrZm Fe+dGNd+7MZD4GuethOyp7nNlWfH1BP85vxxDRQo6/o31tFrfX 0MfTJD1og4U+g== Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id pB89OYbn015102 Subject: Re: [Caml-list] Generic printer patch > On 12/08/2011 03:33 AM, Edgar Friendly wrote: >> On 12/07/2011 10:28 AM, Jérémie Dimino wrote: >>> Hi, >>> >>> I have made a patch for ocaml 3.12.1 which allow to have a generic >>> printing function. The patch is available here: >>> >>> external show : 'a -> string = "%show" >>> >>> Of course it is limited to what the compiler knows, for example the >>> following function will always returns "[;]": >> >> I'm interested in having compile-time reflection like this, but maybe >> with a bit more generality. > > You might be interested in my proposal to extend OCaml with a notion of > runtime representation of types: > > http://www.lexifi.com/blog/runtime-types > > A generic value pretty-printer can be written in "user-land" using this > extension (in a type-safe way). Want it! Want it! Want it! Any plans for including this into the official compiler? Gerd > > > -- Alain > > -- > Caml-list mailing list. Subscription management and archives: > https://sympa-roc.inria.fr/wws/info/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > > > -- Gerd Stolpmann, Darmstadt, Germany gerd@gerd-stolpmann.de Creator of GODI and camlcity.org. Contact details: http://www.camlcity.org/contact.html Company homepage: http://www.gerd-stolpmann.de *** Searching for new projects! Need consulting for system *** programming in Ocaml? Gerd Stolpmann can help you.