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
Manual: add extended description of warning 57 #468
Conversation
Thanks! I would like to contribute to this new section as well. I may create an upstream branch to coordinate our work, and then ask for a merge in trunk (or the release branch) when we have a few more warnings documented. (Of course the goal is not to cover everything, but just one would feel odd, wouldn't it?) |
match the scrutinee against the pattern, if it matches, test the guard, | ||
and if the guard passes, take the branch. | ||
In particular, consider the input "(Const"~\var{a}", Const"~\var{b}")", where | ||
\var{a} fails the test "is_neutral"~\var{f}, while \var{b} passes the test |
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.
Shouldn't this say "" fails the test "is_neutral"~\var{a} "" instead of var{f} ?
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. Fixed.
Adding more warnings to the section would be certainly better. If you prefer to have an upstream branch to collect them, it is perfectly fine with me. |
426e276
to
3323470
Compare
So I just created a new branch warnings-documentation. Would you resend your PR there? (You need to be prepared to have one more Changes line in your name once this gets merged upstream :-) |
PR resend. |
cc @damiendoligez : you may have an opinion about this (low priority) stuff. |
More documentation is always better, but I'm starting to get uncomfortable with the length of the lines in some of the new warning messages. |
To reduce a little the warning length, the reference A more long term solution might be to use Format for printing warnings and add a break hint after Or maybe, just hard code a line break here. |
* Do not run the offset check by default * Better style for the comment * Add comment about to_cmm handling of missing offset
- Ocamlorg_package.Documentation.item is now a polymorphic variant, to ease rendering the items in eml - Add breadcrumbs.eml as a component rendering navigation breadcrumbs - Update handler.ml, package_documentation.eml and package_layout.eml to render the breadcrumbs Co-authored-by: Thibaut Mattio <thibaut.mattio@gmail.com>
This PR extracts the detailed comment on warning 57 in
typing/parmatch.ml
, rewords it slightlyto be more neutral, and adds it to a new section in the manual, just after the section 8.4 on common compiler errors.
Ideally, this new section would give a place to describe in detail future or past warnings and the rationale behind them.