Version franaise
Home About Download Resources Contact us
Browse thread
Automatically install printer
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Michaël Grünewa ld <michael.grunewald@l...>
Subject: Automatically install printer
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.
-- 
cheers,
Michaël