Re: [Caml-list] Parsing cmi file

2012-03-19 Thread Richard W.M. Jones
On Wed, Mar 14, 2012 at 02:14:12PM -0400, Hongbo Zhang wrote: On 3/14/12 2:09 PM, Richard W.M. Jones wrote: On Tue, Mar 13, 2012 at 05:52:37PM -0400, bob zhang wrote: Hi list, I noticed that Godi can pretty print cmi files, is there already libraries parsing cmi files? cmigrep may be

Re: [Caml-list] Parsing cmi file

2012-03-14 Thread Richard W.M. Jones
On Tue, Mar 13, 2012 at 05:52:37PM -0400, bob zhang wrote: Hi list, I noticed that Godi can pretty print cmi files, is there already libraries parsing cmi files? cmigrep may be worth looking at. It's also a nasty(-ish) hack since it has to use the compiler sources. I agree it would be

Re: [Caml-list] Parsing cmi file

2012-03-14 Thread Mehdi Dogguy
On 03/14/2012 07:14 PM, Hongbo Zhang wrote: I tried, it does not compile, but it would be not hard to fix, I guess. In Debian, we apply the following patches to compile it: http://patch-tracker.debian.org/package/cmigrep/1.5-9 FWIW, it compiles and runs perfectly well with any OCaml

Re: [Caml-list] Parsing cmi file

2012-03-13 Thread Gerd Stolpmann
Hi list, I noticed that Godi can pretty print cmi files, is there already libraries parsing cmi files? Yes, toplevellib.cma (i.e. the ocaml toploop). It's a silly trick. Run the toploop and do module M = NameOfTheCMI;; and the toploop responds. Gerd Many thanks -- -- Bob --

Re: [Caml-list] Parsing cmi file

2012-03-13 Thread bob zhang
Thanks. I know the dirty tricks, is there some way not that dirty? Godi did pretty printing this way? On Tue, Mar 13, 2012 at 6:36 PM, Gerd Stolpmann i...@gerd-stolpmann.de wrote: Hi list,    I noticed that Godi can pretty print cmi files, is there already libraries parsing cmi files? Yes,