This repository has been archived by the owner on Jan 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 96
Defer type errors #47
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
7091071
TEST: Degrade type error to warning
jacg b1f324f
Defer type errors (first approach: FAILED)
jacg e6f4017
Defer type errors (second approach: SUCCESS)
jacg 4470352
TEST: Reinstate severity of type errors
jacg 45f3baa
Upgrade severity of deferred Type Errors after typecheck
jacg e5f4e24
Hide helper functions in local scopes
jacg 02160de
Stop setting Opt_WarnDeferredTypeErrors
jacg 71f176a
TEST: Check that typed holes are reported as errors
jacg cbf20d9
TEST: Downgrade severity of typed holes Error -> Warning
jacg 9fae96c
Defer typed holes
jacg f21d59f
TEST: Reinstate severity of typed holes
jacg 246d99c
Upgrade severity of deferred Typed Holes after typecheck
jacg f4ee843
TEST: Degrade variable out of scope from Error to Warning
jacg efb92c1
Defer out of scope variables
jacg f086d69
TEST: Reinstate severity of out of scope variables
jacg bf7c4af
Upgrade severity of deferred out of scope vars after typecheck
jacg b5961e7
Add explicit tests for deferrals
jacg 1e08d50
Add IdeOption for deferral switching
jacg e162696
Improve documentation of optDefer
jacg 6a33708
Add IdeDefer newtype
jacg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
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.
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.
I’m not sure what you are trying to test here. Afaik, this test passes without any of your changes as well? It would be good to get a test that actually relies on this behavior.
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.
I guess you want to test that the undemoting works? Looks reasonable in that case but a comment would be good and it would still be nice to have a test that checks that actually relies on deferring the errors.
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.
Yes, the point is that the definition of this test (and a couple of others like it) evolves through this sequence of commits, and the implementation has to follow the tests through the Error -> Warning -> Error route. When all is said and done, we end up where we started (error) but these test document, in the sequence of commits, that each individual step did what it was supposed to; or, quite importantly in the case of the first attempt to defer type errors, that the obvious approach does NOT work, justifying the more complex implementation that ended up being used.
Anyway, I have added tests which detect if any of the deferrals are removed. These, of course, will have to be duplicated once I've added the deferral on/off switch.