Version française
Home     About     Download     Resources     Contact us    
Browse thread
Documenting submodules ?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: David Teller <David.Teller@u...>
Subject: Re: [Caml-list] Documenting submodules ?
Let me rephrase:

Case 1)

==== sub.ml
(** This is [Sub] *)

type t
 (** This is [Sub.t]*)

==== main.ml
module Sub = Sub

Running ocamldoc drops the comments of sub.ml .

Case 2)

==== sub.ml
module SubSub = struct
  type t
  (** This is [SubSub.t] *)
end

==== main.ml
module SubSubSub = Sub.SubSub


Running ocamlc drops the comments of sub.ml -- and the very existence of
SubSub.t.

Cheers,
 David

On Mon, 2008-05-05 at 10:11 +0200, Julien Signoles wrote:
> > When invoking ocamldoc, either directly or through ocamlbuild + .odocl,
> > the generated documentation only contains the name of modules, without
> > any of the comments or even the values.
> 
> Usually ocamldoc works fine with submodule:
> 
> ===== sub.ml
> (** This is {!A}. It contains a properly-documented submodule {!A.B} and a
>      single value {!A.a}. *)
> module A = struct
> 
>    (** This is {!B}. It contains a single value {!B.b}. *)
>    module B = struct let b = 1 end
> 
>    let a = 0
> 
> end
> =====
> 
> $ ocamldoc -version
> Ocamldoc 3.10.1
> $ ocamldoc -html sub.ml
> 
> Hope this helps,
> Julien Signoles
> 
-- 
David Teller
 Security of Distributed Systems
  http://www.univ-orleans.fr/lifo/Members/David.Teller
 Angry researcher: French Universities need reforms, but the LRU act brings liquidations.