> 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 "[<poly>;<poly>]": >> >> 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 [email protected] 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. -- 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
