dsheets / codoc

OCaml documentation generator
34 stars 5 forks source link

Support expansion #90

Open lpw25 opened 9 years ago

lpw25 commented 9 years ago

This adds support for expanding packs, sub-modules, parameters and module types (which still leaves classes and class types to do). It also adjusts how extraction works so that it will only chose a .cmt file if that file is an interface (i.e. if there was no .mli file). I'm sure various other small fixes and changes have also snuck in.

lpw25 commented 9 years ago

The first two commits are actually from #89, which this PR is on top of.

dbuenzli commented 9 years ago

This removes the notion of substruct and instead expands all sub-modules and module types.

How is sub-module expansion controlled ? Most of the documentation out there wasn't designed for expansion, so the default should be not to inline the documentation of submodules --- this is currently rightly done on master.

dsheets commented 9 years ago

Expansion here means in the namespace and not inline.

lpw25 commented 9 years ago

How is sub-module expansion controlled ?

Sorry, I should have been clearer. The expansion of sub-modules, module types and packs I referred to is not about expanding these things inline with their parent (this is currently only done for includes), but about adding a fresh page for each of these things and then expanding out their module types so that we can print a signature rather than just a module type expression.

dsheets commented 9 years ago

Could you please split this changeset into functional patches? I'm extremely wary of merging so many unrelated changes simultaneously.

In particular, the extraction component, the command line component, the template component, the substruct component, and the numerous formatting and renamings are all separate features. By splitting the patch apart, we can ensure that each change is acceptable, potentially iterate on its design, and maintain a clear history for bisection to aid the inevitable debugging.

Thanks!

lpw25 commented 9 years ago

Sure, but it will take a while. I might get around to it next week.

Drup commented 8 years ago

After pinning doc-ock, doc-ock-xml and your branch of codoc.

% codoc doc /home/gabriel/.opam/4.02.3/lib/ocaml/ --scheme file --package stdlib -o complibdoc -f
codoc: internal error, uncaught exception:
       Failure("unknown element @ index")

It works with the version released in https://github.com/dsheets/codoc-repo

Drup commented 8 years ago

Actually, it seems to work, it just doesn't like when there are leftovers from a previous version of codoc.

However, now, codoc complains about templates.

lpw25 commented 8 years ago

However, now, codoc complains about templates.

I'm unlikely to fix any issues with my version of codoc any time soon, but feel free to raise an issue on lpw25/codoc.