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: Maxence Guesdon <maxence.guesdon@i...>
Subject: Re: [Caml-list] Documenting submodules ?
On Mon, 05 May 2008 10:22:50 +0200
David Teller <David.Teller@univ-orleans.fr> wrote:

> 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 .

Indeed, ocamldoc does not use the comment of sub.ml in the page generated
for main.ml. This is normal behaviour. You could comment the creation of the
Sub module (i.e. Main.Sub) by putting a comment around
  module Sub = Sub

> 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.

This is normal behaviour too. You're redefining a module here, and the
way it is defined is reflected by the html code generated by ocamldoc, with
a link on the Sub.SubSub page.

Regards,

Maxence