From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id E8321BC37 for ; Thu, 1 Oct 2009 16:03:07 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkQCALBTxErU4368kWdsb2JhbACBUY1ziyoBAQkLChoDu2MChCcE X-IronPort-AV: E=Sophos;i="4.44,487,1249250400"; d="scan'208";a="33970156" Received: from moutng.kundenserver.de ([212.227.126.188]) by mail2-smtp-roc.national.inria.fr with ESMTP; 01 Oct 2009 16:03:07 +0200 Received: from office1.lan.sumadev.de (dslb-084-059-072-174.pools.arcor-ip.net [84.59.72.174]) by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis) id 0Lr6Jj-1MPEDq3zRj-00eJvt; Thu, 01 Oct 2009 16:03:06 +0200 Received: from [192.168.5.104] (dslb-084-059-072-174.pools.arcor-ip.net [84.59.72.174]) by office1.lan.sumadev.de (Postfix) with ESMTPSA id ACCC9C0EFC; Thu, 1 Oct 2009 16:03:05 +0200 (CEST) Subject: Re: [Caml-list] Missing the cmi files required to use toplevellib.cma From: Gerd Stolpmann To: rixed@happyleptic.org Cc: caml-list@yquem.inria.fr In-Reply-To: <20091001120946.GA17610@yeeloong> References: <20091001120946.GA17610@yeeloong> Content-Type: text/plain Date: Thu, 01 Oct 2009 16:07:47 +0200 Message-Id: <1254406067.12261.5.camel@flake.lan.gerd-stolpmann.de> Mime-Version: 1.0 X-Mailer: Evolution 2.12.1 Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX18fihktUfhjCYL7a/DqvsMe6INPQegtSdd/lWG sSdwnejEPU+FEmQelPs5q+ET54D/jEThqu8cwFxeSDPyN3mnl/ qaQ7gFxBnxwTwjDPe+RTQ== X-Spam: no; 0.00; cmi:01 toplevellib:01 gerd:01 stolpmann:01 gerd:01 cmi's:01 ocamlc:01 lib:01 ocaml:01 toplevellib:01 cmi's:01 ocamlc:01 lib:01 ocaml:01 cmi:01 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 ------------------------------------------------------------