Browse thread
Missing the cmi files required to use toplevellib.cma
-
rixed@h...
- Richard Jones
- Mehdi Dogguy
- Gerd Stolpmann
- David Allsopp
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ 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
with
ocamlc -o cmidump -I /opt/godi-3.11/lib/ocaml/compiler-lib/
toplevellib.cma cmidump.ml
For docs.camlcity.org 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
http://docs.camlcity.org/docs/godipkg/3.11/godi-lwt/lib/ocaml/pkg-lib/lwt/lwt.cmi_pretty
You can switch between the pretty-printed cmi, the mli, and the source
files. Ideal for exploring software.
Gerd
Am Donnerstag, den 01.10.2009, 14:09 +0200 schrieb
rixed@happyleptic.org:
> 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:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
--
------------------------------------------------------------
Gerd Stolpmann, Bad Nauheimer Str.3, 64289 Darmstadt,Germany
gerd@gerd-stolpmann.de http://www.gerd-stolpmann.de
Phone: +49-6151-153855 Fax: +49-6151-997714
------------------------------------------------------------