Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First gospel/doc attribute is attached to the module if it is not preceded by a documentation one. #360

Open
n-osborne opened this issue Oct 19, 2023 · 1 comment
Labels

Comments

@n-osborne
Copy link
Contributor

For example, manpage for Gospelstdlib.List is lacking the gospel type declaration and its informal documentation end up in the synopsis:

$ ocamlc -bin-annot src/stdlib/gospelstdlib.mli
$ odoc compile src/stdlib/gospelstdlib.cmti
$ odoc man-generate src/stdlib/gospelstdlib.odoc --output-dir ./
$ man Gospelstdlib.List.3o | head -n 15

List(3)                                      OCaml Library                                      List(3)

Name
       Gospelstdlib.List

Synopsis
  Module Gospelstdlib.List

       An alias for 'a list.

Documentation
       length l is the number of elements of l.

       When l contains one or more elements, hd s is the first element of l.

One could make gospel.ppx add an empty documentation attribute before the first gospel attribute (and its documentation counterpart) if it is not preceded by a documentation attribute (a real module documentation).

@n-osborne n-osborne added the ppx label Oct 19, 2023
@n-osborne
Copy link
Contributor Author

Unfortunately, the empty documentation attribute show up in the generated documentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant