caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* ocamlbuild: generating documentation
@ 2007-11-21 14:41 Hugo Ferreira
  2007-11-21 15:31 ` [Caml-list] " Nicolas Pouillard
  0 siblings, 1 reply; 6+ messages in thread
From: Hugo Ferreira @ 2007-11-21 14:41 UTC (permalink / raw)
  To: Caml Mailing List

Hello,

I am attempting to use the document generation option provided by
ocamlbuild. The manual states that ocamlbuild will "collect all the
documentation for the interfaces (which will be built if necessary").

Questions:
1. How can I change this so that both *.ml and *.mli file are be used?

2. Must I compile the files prior to invoking "ocamlbuild
all.docdir/index.html" at any point?

On a different issue, the manual refers to "packing subdirectories
into modules"...

1. Are we talking about indicating a path here, for example:

cat all.odocl
src/mod/Mod

So that Mod is documented?

TIA,
Hugo F.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Caml-list] ocamlbuild: generating documentation
  2007-11-21 14:41 ocamlbuild: generating documentation Hugo Ferreira
@ 2007-11-21 15:31 ` Nicolas Pouillard
  2007-11-21 16:00   ` Hugo Ferreira
  0 siblings, 1 reply; 6+ messages in thread
From: Nicolas Pouillard @ 2007-11-21 15:31 UTC (permalink / raw)
  To: hmf; +Cc: caml-list

Excerpts from hmf's message of Wed Nov 21 15:41:12 +0100 2007:
> Hello,
Hello,

> I am attempting to use the document generation option provided by
> ocamlbuild. The manual states that ocamlbuild will "collect all the
> documentation for the interfaces (which will be built if necessary").
> 
> Questions:
> 1. How can I change this so that both *.ml and *.mli file are be used?

If  I well remember in OCaml-3.10.0 only mli files are took in account. In the
CVS version ml files are used when no mli can be built.

> 2. Must I compile the files prior to invoking "ocamlbuild
> all.docdir/index.html" at any point?

No it must works nicely without any pre-compilation.

> On a different issue, the manual refers to "packing subdirectories
> into modules"...
> 
> 1. Are we talking about indicating a path here, for example:
> 
> cat all.odocl
> src/mod/Mod
> 
> So that Mod is documented?

No it's not related.

Packing  subdirectories  is  about  using  -pack  to nest modules into one big
module.  The  "subdirectories"  here  is perhaps misleading but that's because
most  of  the  time  packages are used to reflect the directory hierarchy into
modules.

-- 
Nicolas Pouillard aka Ertai


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Caml-list] ocamlbuild: generating documentation
  2007-11-21 15:31 ` [Caml-list] " Nicolas Pouillard
@ 2007-11-21 16:00   ` Hugo Ferreira
  2007-11-23 14:43     ` Nicolas Pouillard
  0 siblings, 1 reply; 6+ messages in thread
From: Hugo Ferreira @ 2007-11-21 16:00 UTC (permalink / raw)
  To: Nicolas Pouillard; +Cc: caml-list

Hi,

Nicolas Pouillard wrote:
> Excerpts from hmf's message of Wed Nov 21 15:41:12 +0100 2007:
>> Hello,
> Hello,
> 
>> I am attempting to use the document generation option provided by
>> ocamlbuild. The manual states that ocamlbuild will "collect all the
>> documentation for the interfaces (which will be built if necessary").
>>
>> Questions:
>> 1. How can I change this so that both *.ml and *.mli file are be used?
> 
> If  I well remember in OCaml-3.10.0 only mli files are took in account. 

Yes, my tests shows this.

> In the CVS version ml files are used when no mli can be built.
> 

What do you mean "can't be built"? I assume you can always generate a
*.mli given *.ml, correct? Are you referring to other types of sources
such as *.mly?

Can the behaviour be changed? If I am not mistaken ocamldoc can merge
*.ml and *.mli files so I think it may be easy enough to allow this.

>> 2. Must I compile the files prior to invoking "ocamlbuild
>> all.docdir/index.html" at any point?
> 
> No it must works nicely without any pre-compilation.
> 

Ok.

>> On a different issue, the manual refers to "packing subdirectories
>> into modules"...
>>
>> 1. Are we talking about indicating a path here, for example:
>>
>> cat all.odocl
>> src/mod/Mod
>>
>> So that Mod is documented?
> 
> No it's not related.
> 
> Packing  subdirectories  is  about  using  -pack  to nest modules into one big
> module.  The  "subdirectories"  here  is perhaps misleading but that's because
> most  of  the  time  packages are used to reflect the directory hierarchy into
> modules.
> 

Ok. Understood.

Thank you for such prompt replies.


Regards,
Hugo F.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Caml-list] ocamlbuild: generating documentation
  2007-11-21 16:00   ` Hugo Ferreira
@ 2007-11-23 14:43     ` Nicolas Pouillard
  2007-11-23 15:29       ` Hugo Ferreira
  0 siblings, 1 reply; 6+ messages in thread
From: Nicolas Pouillard @ 2007-11-23 14:43 UTC (permalink / raw)
  To: hmf; +Cc: caml-list

Excerpts from hmf's message of Wed Nov 21 17:00:57 +0100 2007:
> Hi,
> 
> Nicolas Pouillard wrote:
> > Excerpts from hmf's message of Wed Nov 21 15:41:12 +0100 2007:
> >> Hello,
> > Hello,
> > 
> >> I am attempting to use the document generation option provided by
> >> ocamlbuild. The manual states that ocamlbuild will "collect all the
> >> documentation for the interfaces (which will be built if necessary").
> >>
> >> Questions:
> >> 1. How can I change this so that both *.ml and *.mli file are be used?
> > 
> > If  I well remember in OCaml-3.10.0 only mli files are took in account. 
> 
> Yes, my tests shows this.
> 
> > In the CVS version ml files are used when no mli can be built.
> > 
> 
> What do you mean "can't be built"?
It's a little stronger than "doesn't exists".

> I assume you can always generate a
> *.mli given *.ml, correct?
Yes and no, "ocamlc -i" try to do this but there's no correction guarantee.
In  ocamlbuild  we've  not  put  a rule ".ml->.mli" because it will use it too
often. However we have a ".ml->.inferred.mli" rule.

> Are you referring to other types of sources
> such as *.mly?
Yes for instance.

> Can the behaviour be changed? If I am not mistaken ocamldoc can merge
> *.ml and *.mli files so I think it may be easy enough to allow this.
Yes  you can look at ocamlbuild/ocaml_{specific,tools}.ml and then add rule to
your myocamlbuild.ml that will depend on both the ml and the mli.
Don't forget to give ~insert:`top to your rule to give it the highest priority.

Regards,
-- 
Nicolas Pouillard aka Ertai


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Caml-list] ocamlbuild: generating documentation
  2007-11-23 14:43     ` Nicolas Pouillard
@ 2007-11-23 15:29       ` Hugo Ferreira
  2007-11-24 10:49         ` Nicolas Pouillard
  0 siblings, 1 reply; 6+ messages in thread
From: Hugo Ferreira @ 2007-11-23 15:29 UTC (permalink / raw)
  To: Nicolas Pouillard; +Cc: caml-list


Ok. I will take a look at the (2) sources you indicated.

Merci.

P.S: OT, I left a patch for you in the OcalIDE forum.


Nicolas Pouillard wrote:
> Excerpts from hmf's message of Wed Nov 21 17:00:57 +0100 2007:
>> Hi,
>>
>> Nicolas Pouillard wrote:
>>> Excerpts from hmf's message of Wed Nov 21 15:41:12 +0100 2007:
>>>> Hello,
>>> Hello,
>>>
>>>> I am attempting to use the document generation option provided by
>>>> ocamlbuild. The manual states that ocamlbuild will "collect all the
>>>> documentation for the interfaces (which will be built if necessary").
>>>>
>>>> Questions:
>>>> 1. How can I change this so that both *.ml and *.mli file are be used?
>>> If  I well remember in OCaml-3.10.0 only mli files are took in account. 
>> Yes, my tests shows this.
>>
>>> In the CVS version ml files are used when no mli can be built.
>>>
>> What do you mean "can't be built"?
> It's a little stronger than "doesn't exists".
> 
>> I assume you can always generate a
>> *.mli given *.ml, correct?
> Yes and no, "ocamlc -i" try to do this but there's no correction guarantee.
> In  ocamlbuild  we've  not  put  a rule ".ml->.mli" because it will use it too
> often. However we have a ".ml->.inferred.mli" rule.
> 
>> Are you referring to other types of sources
>> such as *.mly?
> Yes for instance.
> 
>> Can the behaviour be changed? If I am not mistaken ocamldoc can merge
>> *.ml and *.mli files so I think it may be easy enough to allow this.
> Yes  you can look at ocamlbuild/ocaml_{specific,tools}.ml and then add rule to
> your myocamlbuild.ml that will depend on both the ml and the mli.
> Don't forget to give ~insert:`top to your rule to give it the highest priority.
> 
> Regards,


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Caml-list] ocamlbuild: generating documentation
  2007-11-23 15:29       ` Hugo Ferreira
@ 2007-11-24 10:49         ` Nicolas Pouillard
  0 siblings, 0 replies; 6+ messages in thread
From: Nicolas Pouillard @ 2007-11-24 10:49 UTC (permalink / raw)
  To: hmf; +Cc: caml-list

Excerpts from hmf's message of Fri Nov 23 16:29:10 +0100 2007:
> 
> Ok. I will take a look at the (2) sources you indicated.
> 
> Merci.
> 
> P.S: OT, I left a patch for you in the OcalIDE forum.

Either  I  cannot  found it, or there is a confusion about the Nicolas you are
talking about.

-- 
Nicolas Pouillard aka Ertai


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-11-24 17:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-21 14:41 ocamlbuild: generating documentation Hugo Ferreira
2007-11-21 15:31 ` [Caml-list] " Nicolas Pouillard
2007-11-21 16:00   ` Hugo Ferreira
2007-11-23 14:43     ` Nicolas Pouillard
2007-11-23 15:29       ` Hugo Ferreira
2007-11-24 10:49         ` Nicolas Pouillard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).