Version franaise
Home About Download Resources Contact us

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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

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.