[
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: | Philippe Wang <lists@p...> |
| Subject: | Re: [Caml-list] annotating nested modules with ocamldoc |
Le 6 janv. 07 à 16:22, Ian Zimmerman a écrit : > Given the following files: > > (* Foo.mli *) > > module type BOO = sig > (** workaround: put documentation here *) > val boo : int -> int > end > > module Boo : BOO > > (* Foo.mli ends *) > > > > > (* Foo.ml *) > > let internal_goo i = i + 1 > > module type BOO = sig > val boo : int -> int > end > > module Boo : BOO = struct > let boo i = internal_goo (i + 1) > end > > (* Foo.ml ends *) > > > how do I produce an ocamldoc set *with* Foo.Boo.boo but *without* > Foo.internal_goo ? > > So far, the only way I've found is to only process the mli file with > ocamldoc and attach an annotation in the signature in the indicated > place, but that is awkward when I want to make a cross-reference (I > have to reference the signature instead of the structure). The > problem is that when processing a ml file, the granularity of what is > included is one of two extremes: either everything, or just stuff > that's declared in the corresponding mli file, and the latter by > definition excludes members of modules :-( I suggest you to use The Stop special comment (**/**) in the .ml file. (ocaml reference manual, section 15.2.2 ) Cheers, Philippe Wang mail(at)philippewang.info