Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: 2007-01-06 (15:22)
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

module Boo : BOO

(* Foo.mli ends *)

(* *)

let internal_goo i = i + 1

module type BOO = sig
  val boo : int -> int

module Boo : BOO = struct
  let boo i = internal_goo (i + 1)

(* ends *)

how do I produce an ocamldoc set *with* 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 :-(