elliottt opened PR #4685 from trevor/isle-and-pattern-bug
to main
:
- Add a test case that exposes the bug
- Add a custom ord instance for PatternInst
- Revert "Add a custom ord instance for PatternInst"
- Fixup test case
- Order fallible extractors first
<!--
Please ensure that the following steps are all taken care of before submitting
the PR.
[ ] This has been discussed in issue #..., or if not, please tell us why
here.[ ] A short description of what this does, why it is needed; if the
description becomes long, the matter should probably be discussed in an issue
first.[ ] This PR contains test cases, if meaningful.
- [ ] A reviewer from the core maintainer team has been assigned for this PR.
If you don't know who could review this, please indicate so. The list of
suggested reviewers on the right can help you.Please ensure all communication adheres to the code of conduct.
-->
elliottt updated PR #4685 from trevor/isle-and-pattern-bug
to main
.
elliottt edited PR #4685 from trevor/isle-and-pattern-bug
to main
:
Fix a bug with extractor ordering, where constant patterns were taking precedence over fallible extractors.
<!--
Please ensure that the following steps are all taken care of before submitting
the PR.
[ ] This has been discussed in issue #..., or if not, please tell us why
here.[ ] A short description of what this does, why it is needed; if the
description becomes long, the matter should probably be discussed in an issue
first.[ ] This PR contains test cases, if meaningful.
- [ ] A reviewer from the core maintainer team has been assigned for this PR.
If you don't know who could review this, please indicate so. The list of
suggested reviewers on the right can help you.Please ensure all communication adheres to the code of conduct.
-->
elliottt edited PR #4685 from trevor/isle-and-pattern-bug
to main
:
Fix a bug with extractor ordering, where constant patterns were taking precedence over fallible extractors.
I started by writing a custom
Ord
instance but it felt like the rules for how fallible/infallible constructors related to everything else would get a bit hard to reason about. @cfallin suggested breaking theExtractor
case into to constructors, which ended up being much more readable.<!--
Please ensure that the following steps are all taken care of before submitting
the PR.
[ ] This has been discussed in issue #..., or if not, please tell us why
here.[ ] A short description of what this does, why it is needed; if the
description becomes long, the matter should probably be discussed in an issue
first.[ ] This PR contains test cases, if meaningful.
- [ ] A reviewer from the core maintainer team has been assigned for this PR.
If you don't know who could review this, please indicate so. The list of
suggested reviewers on the right can help you.Please ensure all communication adheres to the code of conduct.
-->
elliottt edited PR #4685 from trevor/isle-and-pattern-bug
to main
:
Fix a bug with extractor ordering, where constant patterns were taking precedence over fallible extractors.
I started by writing a custom
Ord
instance but it felt like the rules for how fallible/infallible constructors related to everything else would get a bit hard to reason about. @cfallin suggested breaking theExtractor
case into to constructors, which ended up being much more readable.This PR does change the output of some of the filetest tests, which suggests that we might have been masking some more specific branches during lowering.
<!--
Please ensure that the following steps are all taken care of before submitting
the PR.
[ ] This has been discussed in issue #..., or if not, please tell us why
here.[ ] A short description of what this does, why it is needed; if the
description becomes long, the matter should probably be discussed in an issue
first.[ ] This PR contains test cases, if meaningful.
- [ ] A reviewer from the core maintainer team has been assigned for this PR.
If you don't know who could review this, please indicate so. The list of
suggested reviewers on the right can help you.Please ensure all communication adheres to the code of conduct.
-->
elliottt updated PR #4685 from trevor/isle-and-pattern-bug
to main
.
elliottt has marked PR #4685 as ready for review.
elliottt edited PR #4685 from trevor/isle-and-pattern-bug
to main
:
Fix a bug with extractor ordering, where constant patterns were taking precedence over fallible extractors.
I started by writing a custom
Ord
instance but it felt like the rules for how fallible/infallible constructors related to everything else would get a bit hard to reason about. @cfallin suggested breaking theExtractor
case into to constructors, which ended up being much more readable.This PR does change the output of some of the filetest tests, which suggests that we might have been masking some more specific branches during lowering. I'll need to have a look through the precise-output tests that changed to check if this is the right way to fix the interaction between fallible extractors and constants.
<!--
Please ensure that the following steps are all taken care of before submitting
the PR.
[ ] This has been discussed in issue #..., or if not, please tell us why
here.[ ] A short description of what this does, why it is needed; if the
description becomes long, the matter should probably be discussed in an issue
first.[ ] This PR contains test cases, if meaningful.
- [ ] A reviewer from the core maintainer team has been assigned for this PR.
If you don't know who could review this, please indicate so. The list of
suggested reviewers on the right can help you.Please ensure all communication adheres to the code of conduct.
-->
elliottt closed without merge PR #4685.
Last updated: Nov 22 2024 at 16:03 UTC