Version française
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
Missing the cmi files required to use toplevellib.cma
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Gerd Stolpmann <gerd@g...>
Subject: Re: [Caml-list] Missing the cmi files required to use toplevellib.cma
GODI installs the required cmi's. One can easily compile your utility

ocamlc -o cmidump -I /opt/godi-3.11/lib/ocaml/compiler-lib/

For I converted all cmi's to a readable format by a
little script that does apply "ocamlc -i" on the program "include M"
where M is the module to print. That gives finally a nice view on all
information, like in

You can switch between the pretty-printed cmi, the mli, and the source
files. Ideal for exploring software.


Am Donnerstag, den 01.10.2009, 14:09 +0200 schrieb
> While learning OCaml, I just coded a small program that dumps
> the full content of a cmi file. I find this more usefull than
> ocamlbrowser or to use the toplevel to have a small command line
> driven dumper, and it was also a good pretext to have a look
> under the cover.
> The problem is : most of the usefull types and functions are
> installed in the toplevellib.cma but I can't use this without
> the proper cmi files (I need config.cmi for cmi_magic_number,
> printtyp.cmi and typemod.cmi for printing signatures, but
> env.cmi would be nice to have as well for read_signature).
> Of course I can use those left in ocaml-3.11.1 directory after
> compilation, but having them installed would help the creation
> and distribution of such tools.
> But maybe there is an other way to use toplevellib.cma that I'm
> unaware of ? If not, then why not install these cmi files along
> with toplevellib ?
> Anyway, if anyone is interrested the tool is attached.
> _______________________________________________
> Caml-list mailing list. Subscription management:
> Archives:
> Beginner's list:
> Bug reports:
Gerd Stolpmann, Bad Nauheimer Str.3, 64289 Darmstadt,Germany
Phone: +49-6151-153855                  Fax: +49-6151-997714