-
Notifications
You must be signed in to change notification settings - Fork 52
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
Dynamic layout for inexhaustive case/indeterminately match case #1125
Draft
pigumar1
wants to merge
23
commits into
dev
Choose a base branch
from
haz3l-case-advanced-ui
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+86
−12
Draft
Changes from 22 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
1fe50f6
Merge branch 'dev' into haz3l-incon
cyrus- ed3bcc6
Added a case `NotExhaustive` to `DHExp.t`.
DavidFangWJ 0745463
Init
pigumar1 190faa2
Revert, part I
pigumar1 9816251
Revert Exercise.re
pigumar1 d9d68a6
Update Exercise.re
pigumar1 42069c5
Revert, part II
pigumar1 cfc8e72
Merge branch 'haz3l-case-exhaustiveness' into haz3l-incon
pigumar1 6db5d24
Renamed NotExhaustive to InexhaustiveCase and corrected its behavior
pigumar1 f53c5c5
Reverted InvalidOperationError.re
pigumar1 e43a97d
Merge branch 'haz3l-case-advanced-ui' into haz3l-incon
pigumar1 57b8a76
Porting implementation of incon judgment into Hazel 3. (#1094)
pigumar1 2615f7c
Merge branch 'haz3l-case-redundancy' into haz3l-case-advanced-ui
pigumar1 5ddd220
Crossing out unmatched patterns, part I
pigumar1 a7d1693
Crossing out unmatched patterns, part II
pigumar1 4e5c586
Merge branch 'haz3l-case-redundancy' into haz3l-case-advanced-ui
pigumar1 e504885
Merge branch 'haz3l-case-redundancy' into haz3l-case-advanced-ui
pigumar1 9e8e0b7
Merge branch 'haz3l-case-redundancy' into haz3l-case-advanced-ui
pigumar1 9b852c5
Merge branch 'haz3l-case-redundancy' into haz3l-case-advanced-ui
pigumar1 cda0245
Merge branch 'haz3l-case-redundancy' into haz3l-case-advanced-ui
pigumar1 2e161ea
Merge branch 'haz3l-case-redundancy' into haz3l-case-advanced-ui
pigumar1 f34d540
Merge branch 'haz3l-case-redundancy' into haz3l-case-advanced-ui
cyrus- 9c1ffab
Merge branch 'haz3l-case-redundancy' into haz3l-case-advanced-ui
pigumar1 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,6 +69,7 @@ let cast = (ctx: Ctx.t, mode: Mode.t, self_ty: Typ.t, d: DHExp.t) => | |
} | ||
/* Forms with special ana rules but no particular typing requirements */ | ||
| ConsistentCase(_) | ||
| InexhaustiveCase(_) | ||
| InconsistentBranches(_) | ||
| Sequence(_) | ||
| Let(_) | ||
|
@@ -271,7 +272,11 @@ let rec dhexp_of_uexp = | |
| InHole( | ||
InexhaustiveMatch(Some(Common(Inconsistent(Internal(_))))), | ||
) => | ||
// TODO: review | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not problematic for now since currently |
||
// If multiple errors are associated with a case expression, | ||
// DHExp.InconsistentBranches is prioritized. | ||
DHExp.InconsistentBranches(id, 0, d) | ||
| InHole(InexhaustiveMatch(_)) => DHExp.InexhaustiveCase(id, 0, d) | ||
| _ => ConsistentCase(d) | ||
}; | ||
| TyAlias(_, _, e) => dhexp_of_uexp(m, e) | ||
|
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
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
Oops, something went wrong.
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.
Instead of having three different case constructs in DHExp, let's merge them into one with an additional flag parameter for when there is an error.