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
ocamldoc: fix the printing of (::) #9427
Conversation
ocamldoc/odoc_sig.ml
Outdated
| "::" -> | ||
(* The only infix constructor is always printed (::) *) | ||
"(::)" | ||
| s -> s in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Slight formatting quibble, it looks like in
is usually on its own line for multi-line bindings...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, and it's the style used right above this let-binding.
| s -> s in | |
| s -> s | |
in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, modulo the formatting nitpick.
ocamldoc/odoc_sig.ml
Outdated
| "::" -> | ||
(* The only infix constructor is always printed (::) *) | ||
"(::)" | ||
| s -> s in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, and it's the style used right above this let-binding.
| s -> s in | |
| s -> s | |
in |
ccb8a21
to
1393a37
Compare
Currently,
is printed by ocamldoc as
This small PR fixes this issue in all ocamldoc backends by using directly
(::)
in the ocamldoc description of variant constructors.Closes #9421 .
(There is no parentheses needed for the four other non-UIDENT constructors: true, false, [] and () )