-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Maintain more structural information in type-checking errors #10170
Merged
Commits on May 7, 2021
-
Configuration menu - View commit details
-
Copy full SHA for b5a5f01 - Browse repository at this point
Copy the full SHA b5a5f01View commit details -
Add tests before improving the internal type error representation
Some of these tests point at behavior we're about to change; some of them point to behavior we're confirming that we don't change. * `constraints.ml`, `unbound_type_variables.ml`: Existing code whose behavior we won't change; however, we do fix the indentation in some of the type errors. * `poly.ml`: Add one test whose behavior will change (more detail) and reword one test to use clearer variable names. * `inclusion_errors.ml`: New tests that will confirm our internal changes did not (yet) have externally-visible changes to the type errors. This commit includes existing work by Mekhrubon Tuarev, who did all the early development. I (Antal Spector-Zabusky) came and built the layer of types on top.
Configuration menu - View commit details
-
Copy full SHA for 14ff896 - Browse repository at this point
Copy the full SHA 14ff896View commit details -
Maintain more structural information in type-checking errors
This commit refactors the types that make up type-checking errors to maintain more structural information. Most significantly, we split out the errors we get from unification, moregen, and type equality in `Ctype` into three distinct exceptions, and retain the sorts of information we keep during unification in the other two cases as well (no more `Unify []`). We also maintain more information in `Includecore` about mismatches of primitives, manifests, and private objects and variants This commit doesn't make a lot of changes to the user-visible error messages yet, only what's necessary to support the type changes, but it enables a forthcoming patch where we use this improvement to produce more informative error messages. This commit includes existing work by Mekhrubon Tuarev, who did all the early development. I (Antal Spector-Zabusky) came and built the layer of types on top.
Configuration menu - View commit details
-
Copy full SHA for e87be39 - Browse repository at this point
Copy the full SHA e87be39View commit details -
Address all the excellent reviewer suggestions
One test changes here, reverting to its pre-patch format, as a result of some unification of different trace printing behavior; the prior error message was considered acceptable as well, and both contain the same amount of information, so this doesn't seem to be an issue.
Configuration menu - View commit details
-
Copy full SHA for bd030c0 - Browse repository at this point
Copy the full SHA bd030c0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1656496 - Browse repository at this point
Copy the full SHA 1656496View commit details -
Configuration menu - View commit details
-
Copy full SHA for ee9dd52 - Browse repository at this point
Copy the full SHA ee9dd52View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1d2ad77 - Browse repository at this point
Copy the full SHA 1d2ad77View commit details -
Configuration menu - View commit details
-
Copy full SHA for c8d8ef7 - Browse repository at this point
Copy the full SHA c8d8ef7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7157ce2 - Browse repository at this point
Copy the full SHA 7157ce2View commit details -
Add missing copyright headers to
errortrace.ml{,i}
The code was pulled out of `ctype.ml{,i}`; per Florian, he wrote the code for `Unification_trace` in 2018.
Configuration menu - View commit details
-
Copy full SHA for e16653e - Browse repository at this point
Copy the full SHA e16653eView commit details -
* Fit to 80-column line width * Remove stray non-ASCII character * Delete stray empty line at end of file
Configuration menu - View commit details
-
Copy full SHA for 00dfb07 - Browse repository at this point
Copy the full SHA 00dfb07View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.