<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2009/10/0d0e7c2f54b2c214ec35e371e96f30a4"
  from="Gerd Stolpmann &lt;gerd@g...&gt;"
  author="Gerd Stolpmann"
  date="2009-10-01T14:03:07"
  subject="Re: [Caml-list] Missing the cmi files required to use toplevellib.cma"
  prev="2009/10/176869c021868f21f2362b1dbdee18bd"
  next="2009/10/62723ba10a7414d70b626aeeb1003ff4"
  prev-in-thread="2009/10/24f706f31a503c2a78443d98c999e690"
  next-in-thread="2009/10/62723ba10a7414d70b626aeeb1003ff4"
  prev-thread="2009/10/d0a1fc862d1b751e1499334d17237571"
  next-thread="2009/10/1d7452042a610a8dbce7b15598651158"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="Missing the cmi files required to use toplevellib.cma">
<msg 
  url="2009/10/98c73da54fa7fa1cc5fa152dcf4284e9"
  from="rixed@h..."
  author="rixed@h..."
  date="2009-10-01T12:10:17"
  subject="Missing the cmi files required to use toplevellib.cma">
<msg 
  url="2009/10/bc717410a1099e03dcdf4b772045e5db"
  from="Richard Jones &lt;rich@a...&gt;"
  author="Richard Jones"
  date="2009-10-01T13:54:21"
  subject="Re: [Caml-list] Missing the cmi files required to use toplevellib.cma">
<msg 
  url="2009/10/1ca1217b54152aa48e5bf5a4a4973c7e"
  from="rixed@h..."
  author="rixed@h..."
  date="2009-10-01T16:04:23"
  subject="Re: [Caml-list] Missing the cmi files required to use toplevellib.cma">
</msg>
</msg>
<msg 
  url="2009/10/176869c021868f21f2362b1dbdee18bd"
  from="Mehdi Dogguy &lt;mehdi.dogguy@p...&gt;"
  author="Mehdi Dogguy"
  date="2009-10-01T14:02:27"
  subject="Re: [Caml-list] Missing the cmi files required to use toplevellib.cma">
<msg 
  url="2009/10/24f706f31a503c2a78443d98c999e690"
  from="rixed@h..."
  author="rixed@h..."
  date="2009-10-01T16:06:53"
  subject="Re: [Caml-list] Missing the cmi files required to use toplevellib.cma">
</msg>
</msg>
<msg 
  url="2009/10/0d0e7c2f54b2c214ec35e371e96f30a4"
  from="Gerd Stolpmann &lt;gerd@g...&gt;"
  author="Gerd Stolpmann"
  date="2009-10-01T14:03:07"
  subject="Re: [Caml-list] Missing the cmi files required to use toplevellib.cma">
</msg>
<msg 
  url="2009/10/62723ba10a7414d70b626aeeb1003ff4"
  from="David Allsopp &lt;dra-news@m...&gt;"
  author="David Allsopp"
  date="2009-10-01T15:35:22"
  subject="RE: [Caml-list] Missing the cmi files required to use toplevellib.cma">
</msg>
</msg>
</thread>

<contents>
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:
&gt; While learning OCaml, I just coded a small program that dumps
&gt; the full content of a cmi file. I find this more usefull than
&gt; ocamlbrowser or to use the toplevel to have a small command line
&gt; driven dumper, and it was also a good pretext to have a look
&gt; under the cover.
&gt; 
&gt; The problem is : most of the usefull types and functions are
&gt; installed in the toplevellib.cma but I can't use this without
&gt; the proper cmi files (I need config.cmi for cmi_magic_number,
&gt; printtyp.cmi and typemod.cmi for printing signatures, but
&gt; env.cmi would be nice to have as well for read_signature).
&gt; 
&gt; Of course I can use those left in ocaml-3.11.1 directory after
&gt; compilation, but having them installed would help the creation
&gt; and distribution of such tools.
&gt; 
&gt; But maybe there is an other way to use toplevellib.cma that I'm
&gt; unaware of ? If not, then why not install these cmi files along
&gt; with toplevellib ?
&gt; 
&gt; Anyway, if anyone is interrested the tool is attached.
&gt; _______________________________________________
&gt; Caml-list mailing list. Subscription management:
&gt; http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
&gt; Archives: http://caml.inria.fr
&gt; Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
&gt; 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
------------------------------------------------------------

</contents>

</message>

