Version française
Home     About     Download     Resources     Contact us    
Browse thread
annotating nested modules with ocamldoc
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Ian Zimmerman <nobrowser@g...>
Subject: annotating nested modules with ocamldoc
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 :-(