caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] ocamlbuild, ocamldoc and module packs
@ 2011-11-10 20:52 Guillaume Yziquel
  2011-11-11 13:08 ` Pietro Abate
  0 siblings, 1 reply; 3+ messages in thread
From: Guillaume Yziquel @ 2011-11-10 20:52 UTC (permalink / raw)
  To: caml-list

Hi.

I've been trying recently to use ocamldoc with ocamlbuild on module
packs.

I have a prog.odocl file containing things like

	ModuleOne/A
	ModuleOne/B
	ModuleTwo/C
	ModuleTwo/D

and the ocamldoc documentation has at its root the module A, B, C and D.
Not ModuleOne and ModuleTwo.

Replacing prog.odocl naively by

	ModuleOne
	ModuleTwo

fails with a rather verbose ocamldoc solver error.

My _tags file contains something like:

	<ModuleOne/*.cmx> : for-pack(ModuleOne)
	<ModuleTwo/*.cmx> : for-pack(ModuleTwo)

Is there any way to make ocamldoc behave more nicely with respect to
module packs (if possible via ocamlbuild)?

-- 
     Guillaume Yziquel

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

* Re: [Caml-list] ocamlbuild, ocamldoc and module packs
  2011-11-10 20:52 [Caml-list] ocamlbuild, ocamldoc and module packs Guillaume Yziquel
@ 2011-11-11 13:08 ` Pietro Abate
  2011-11-12  8:35   ` Guillaume Yziquel
  0 siblings, 1 reply; 3+ messages in thread
From: Pietro Abate @ 2011-11-11 13:08 UTC (permalink / raw)
  To: caml-list

Hello.

As far as I know ocamldoc doesn't play very well with -pack. There is 
a very old bug on mantis about this.

I'm in a situation that is worst then yours where I use pack to hide
modules with the same name as in ModuleOne/A and ModuleTwo/A and
ocamldoc refuses altogether to generate doc for both modules.  I've not
found a solution neither for my problem, or more in general for the one
you describe below.

I think the good ppl that put Batteries together had similar issues.

If you look at the Batteries source there is a lot of code aimed at
solving this problem by effectively creating new source files that can
be properly digested by ocamldoc. For what I gathered is pretty specific
to their case, but probably you can use it as an example to write an
appropriate ocamldoc plugin.

Maybe the recent release of Argot by XC solves some of these problem
(just a wild guess, I didn't look at it very carefully).

Hope this helps.

p

On Thu, Nov 10, 2011 at 09:52:59PM +0100, Guillaume Yziquel wrote:
> Hi.
> 
> I've been trying recently to use ocamldoc with ocamlbuild on module
> packs.
> 
> I have a prog.odocl file containing things like
> 
> 	ModuleOne/A
> 	ModuleOne/B
> 	ModuleTwo/C
> 	ModuleTwo/D
> 
> and the ocamldoc documentation has at its root the module A, B, C and D.
> Not ModuleOne and ModuleTwo.
> 
> Replacing prog.odocl naively by
> 
> 	ModuleOne
> 	ModuleTwo
> 
> fails with a rather verbose ocamldoc solver error.
> 
> My _tags file contains something like:
> 
> 	<ModuleOne/*.cmx> : for-pack(ModuleOne)
> 	<ModuleTwo/*.cmx> : for-pack(ModuleTwo)
> 
> Is there any way to make ocamldoc behave more nicely with respect to
> module packs (if possible via ocamlbuild)?
> 
> -- 
>      Guillaume Yziquel
> 
> -- 
> Caml-list mailing list.  Subscription management and archives:
> https://sympa-roc.inria.fr/wws/info/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs

-- 
----
http://en.wikipedia.org/wiki/Posting_style

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

* Re: [Caml-list] ocamlbuild, ocamldoc and module packs
  2011-11-11 13:08 ` Pietro Abate
@ 2011-11-12  8:35   ` Guillaume Yziquel
  0 siblings, 0 replies; 3+ messages in thread
From: Guillaume Yziquel @ 2011-11-12  8:35 UTC (permalink / raw)
  To: Pietro Abate; +Cc: caml-list

Le Friday 11 Nov 2011 à 14:08:47 (+0100), Pietro Abate a écrit :
> Hello.
> 
> As far as I know ocamldoc doesn't play very well with -pack. There is 
> a very old bug on mantis about this.
> 
> I'm in a situation that is worst then yours where I use pack to hide
> modules with the same name as in ModuleOne/A and ModuleTwo/A and
> ocamldoc refuses altogether to generate doc for both modules.  I've not
> found a solution neither for my problem, or more in general for the one
> you describe below.

Well, I'm having the same issue, as ModuleOne and ModuleTwo satisfy a
signature implying a common module.

> I think the good ppl that put Batteries together had similar issues.
> 
> If you look at the Batteries source there is a lot of code aimed at
> solving this problem by effectively creating new source files that can
> be properly digested by ocamldoc. For what I gathered is pretty specific
> to their case, but probably you can use it as an example to write an
> appropriate ocamldoc plugin.

I guess workarounds or ugly hacks are way too overkill for my current
purpose.

> Maybe the recent release of Argot by XC solves some of these problem
> (just a wild guess, I didn't look at it very carefully).

I'll have a try at Argot as soon as the current situation gets too
frustrating.

> Hope this helps.

Thanks.

> p

-- 
     Guillaume Yziquel


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

end of thread, other threads:[~2011-11-12  8:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-10 20:52 [Caml-list] ocamlbuild, ocamldoc and module packs Guillaume Yziquel
2011-11-11 13:08 ` Pietro Abate
2011-11-12  8:35   ` Guillaume Yziquel

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