OCaml is a typeful language but it throws away its type information such as constructor names at runtime of standalone programs. Therefore you cannot have the general value printer which require such type information.
OCaml toplevel or REPL, which you referred as interpreter, is an exception: it keeps types in memory.
For now, if you want to print values a little easier you can auto-generate them using CamlP4 extensions such as "deriving". But it does not provide one generic printer but provides a printer for each type automatically. You still need to compose them like print_list print_dummy
for printing values of dummy list
.