Improve apartness checking#4064
Merged
rhendric merged 3 commits intopurescript:masterfrom Jun 28, 2021
Merged
Conversation
757a015 to
fbea50e
Compare
58d11e8 to
1a2f20e
Compare
1a2f20e to
76086c4
Compare
76086c4 to
8f2019c
Compare
8f2019c to
c53d24e
Compare
Instances in an instance chain that don't match the constraint being searched must be proven apart from the constraint for the search to continue to the next instance in the chain. This commit tweaks the apartness checker to fix a variety of incorrect apartness judgments, and also adds a hint to the NoInstanceFound error message if ambiguous instances (neither matching nor apart) excluded additional instances in a chain from consideration.
c53d24e to
a5d9a1f
Compare
hdgarrood
approved these changes
Jun 26, 2021
Contributor
hdgarrood
left a comment
There was a problem hiding this comment.
Looks great! This is going to help a lot with what I think is a relatively common source of confusion.
Member
Author
|
Just as a procedural note, I want to land #4118 before this, and then adapt this to use the same error message formatting for unnamed instances. |
Contributor
|
Sounds good - feel free to go ahead and merge that now if you're ready. |
This was referenced Jun 29, 2021
rhendric
added a commit
that referenced
this pull request
Jul 2, 2021
rhendric
added a commit
that referenced
this pull request
Jul 2, 2021
rhendric
added a commit
to rhendric/purescript
that referenced
this pull request
Jul 3, 2021
rhendric
added a commit
to rhendric/purescript
that referenced
this pull request
Jul 6, 2021
rhendric
added a commit
to rhendric/purescript
that referenced
this pull request
Jul 11, 2021
rhendric
added a commit
to rhendric/purescript
that referenced
this pull request
Jul 11, 2021
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Instances in an instance chain that don't match the constraint being
searched must be proven apart from the constraint for the search to
continue to the next instance in the chain. This commit tweaks the
apartness checker to fix a variety of incorrect apartness judgments,
and also adds a hint to the NoInstanceFound error message if ambiguous
instances (neither matching nor apart) excluded additional instances in
a chain from consideration.
Description of the change
Fixes #3329, fixes #3531, fixes #3941, fixes #4028.
Checklist: