Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1552 +/- ##
==========================================
- Coverage 90.25% 90.25% -0.01%
==========================================
Files 64 64
Lines 9926 9914 -12
==========================================
- Hits 8959 8948 -11
+ Misses 967 966 -1
🚀 New features to boost your workflow:
|
| type err = | ||
| | TypeError of TypeError.t | ||
| | IdentifierError of IdentifierError.t | ||
| | ExpressionError of ExpressionError.t | ||
| | StatementError of StatementError.t | ||
|
|
||
| type t = Location_span.t * err |
There was a problem hiding this comment.
It's a bit unsightly that Semantic_error.t is now an opaque tuple (opaque since users are expected to call our location instead fst directly) and pp only prints half of it.
There was a problem hiding this comment.
pp only printed half of of the actual content of the type before, it was just one level deeper.
I played around with having pp do the entire job, but it isn't clear where the shared code between Semantic_error and Syntax_error for printing the context would go. It can't stay in Errors, since that would introduce a circular dependency, and it can't be moved entirely into Middle.Location, since it relies on Frontend.Include_files
This is the first piece of something like #1549, but for the semantic errors this time. For now, just some minor edits to the wording of a few messaging and some bikeshed-y moving of errors between the categories that the Semantic_error module uses internally.
I also updated the internal definition of
Semantic_error.tandSyntax_error.tto 'lift' the location up. This makes it look a bit more like Warning.t and saves some duplicated type informationSubmission Checklist
Release notes
Updated the error messages for type errors to be more consistent with one another.
Copyright and Licensing
By submitting this pull request, the copyright holder is agreeing to
license the submitted work under the BSD 3-clause license (https://opensource.org/licenses/BSD-3-Clause)