caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Automatic generation of mli files
@ 2003-06-06  9:57 Stefan Heimann
  2003-06-06 11:53 ` Maxence Guesdon
  2003-06-06 15:33 ` Brian Hurt
  0 siblings, 2 replies; 15+ messages in thread
From: Stefan Heimann @ 2003-06-06  9:57 UTC (permalink / raw)
  To: caml-list

Hi,

I searching for a way for generating the .mli file for a given source .ml
file automatically. My basic idea is like that:

(1) Specify in the .ml file which values and types should be exported
    and if a type should be exported abstract or not. This could be
    done with a special comment at the top of the file.

(2) Filter the output of `ocamlc -i' to exclude the values and types
    that should not be exported and to make the types abstract if
    needed.

Of course, the tool should check of there is an existing .mli
file. If the .mli file was not generated by the tool it is not
overwritten. If the list of exported values and types has not changed
the .mli file is not updated too.

I experimented a little bit with parsing the output of `ocamlc -i'
and printing the modified parse tree. I took must code from the ocaml
distribution. However, I don't think that this is a good way.

Any ideas of how to implement such a tool? Are there any existing
tools with this functionality?

Bye,
  Stefan

-- 
Stefan Heimann
http://www.stefanheimann.net :: personal website.
http://cvsshell.sf.net       :: CvsShell, a console based cvs client.

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2003-06-09  8:10 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-06  9:57 [Caml-list] Automatic generation of mli files Stefan Heimann
2003-06-06 11:53 ` Maxence Guesdon
2003-06-06 15:33 ` Brian Hurt
2003-06-06 15:59   ` Stefan Heimann
2003-06-06 16:17     ` Ville-Pertti Keinonen
2003-06-06 18:30   ` Chris Hecker
2003-06-06 19:16     ` Brian Hurt
2003-06-06 19:21       ` Chris Hecker
2003-06-06 21:06         ` Manos Renieris
2003-06-06 22:06           ` Chris Hecker
2003-06-06 20:24       ` Stefan Heimann
2003-06-06 20:38         ` Jeffrey J. Cook
     [not found]           ` <200306091226.13255.yangsx@fltrp.com>
2003-06-09  4:59             ` Yang Shouxun
2003-06-09  8:10               ` Stefan Heimann
2003-06-07  0:27       ` John Max Skaller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).