[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | David Teller <David.Teller@e...> |
| Subject: | Re: [Caml-list] Automatically install printer |
I concur that this would be nice. Cheers, David On Thu, 2007-06-14 at 14:28 +0200, Michaël Grünewald wrote: > Hi all, > > the toplevel `ocaml' allows to install printers for custom types > with the `#install_printer' directive. Is this possible to do this > automatically? > > Being more precise, if I define module `F' made of a type `t' and a > `to_string' function, can I arrange so that the toplevel uses function > `F.to_string' to print `F.t' values? I can use a wrapper script around > the `ocaml' command that will issue the directive before giving back the > hand, but this would break if `F' happens to be a functor: only the > functor instantiation knows what the correct directive is.