Skip to content

Commit

Permalink
List only public modules in generated index
Browse files Browse the repository at this point in the history
Fix #2008

Signed-off-by: Rudi Grinberg <[email protected]>
  • Loading branch information
rgrinberg committed Apr 2, 2019
1 parent 8430794 commit b3ec401
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,13 @@ unreleased

- Install .cmi files of private modules in a `.private` directory (#1983, fix
#1973 @rgrinberg)

- Fix dune subst attempting to sunbstitute on directories. (#2000, fix #1997,
@rgrinberg)

- Do not list private modules in the generated index. (#2009, fix #2008,
@rgrinberg)

1.8.2 (10/03/2019)
------------------

Expand Down
1 change: 1 addition & 0 deletions src/odoc.ml
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,7 @@ let default_index ~pkg entry_modules =
"This library exposes the following toplevel modules:\n\
{!modules:%s}\n"
(modules
|> List.filter ~f:Module.is_public
|> List.sort ~compare:(fun x y ->
Module.Name.compare (Module.name x) (Module.name y))
|> List.map ~f:(fun m -> Module.Name.to_string (Module.name m))
Expand Down
2 changes: 1 addition & 1 deletion test/blackbox-tests/test-cases/odoc/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
{0 foo index}
{1 Library foo}
This library exposes the following toplevel modules:
{!modules:Foo Foo2 Foo3}
{!modules:Foo Foo2}
{1 Library foo.byte}
The entry point of this library is the module:
{!module-Foo_byte}.
Expand Down

0 comments on commit b3ec401

Please sign in to comment.