Read cmt files content

I have a few .cmt files and I’d like to print the typedtrees inside them, is there a command for doing so? I know about ocamlcmtfile, but I can’t find an argument that allows me to print the typedtree like ocamlc -dtypedtree does.

Not that I know of (I had never heard about ocamlcmtfile before). But it should be pretty easy to write a small program for this using the functions from the module Printtyped in compiler-libs.


1 Like