Browse thread
[Caml-list] non-exported functions
[
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: | skaller <skaller@o...> |
| Subject: | Re: [Caml-list] non-exported functions |
On Wed, 2003-10-29 at 11:11, Dustin Sallings wrote: > On Tue, 28 Oct 2003 21:07:57 +0000 > Richard Jones <rich@annexia.org> wrote: > > > On Tue, Oct 28, 2003 at 12:02:40PM -0800, Dustin Sallings wrote: > >> > >> I've got a module that contains a few helper functions that should > >> only be used internally. Is there a way to prevent them from being > >> exported and/or included in ocamldoc output? > > > > Define an .mli file for your module. Anything not listed explicitly in > > the .mli file won't be exported. > > I kinda liked automatically generating my .mli, but I guess I can live > with that. Aw, its kind of annoying. Two or three extra keywords might fix 95% of cases: let private x = ... Just don't put x in the interface type abstract x = .. put x in the interface as type x Now you may need an mli in the unusual case a function of type A -> B is constrained to type C -> D in the module and to type E -> F in the interface. Explicit interfaces are of course still needed for more complex constraints. ------------------- 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