Skip to content

fix: AddConField, SetConFieldType robustness#441

Merged
mergify[bot] merged 2 commits intomainfrom
brprice/AddConField-fixes
May 11, 2022
Merged

fix: AddConField, SetConFieldType robustness#441
mergify[bot] merged 2 commits intomainfrom
brprice/AddConField-fixes

Conversation

@brprice
Copy link
Copy Markdown
Contributor

@brprice brprice commented May 9, 2022

There are two fixes here. Firstly, ensure that updating case branches is
robust when the scrutinee is also updated (due to being an application
of the given constructor). Secondly, handle the case of an application
of a constructor of a parameterised type, i.e. where the spine includes
type applications.

@brprice brprice requested a review from a team May 9, 2022 17:17
@brprice
Copy link
Copy Markdown
Contributor Author

brprice commented May 9, 2022

This was found when adding tests for #429, but I expect it has been lurking since #367.

@brprice brprice changed the title fix: AddConField robustness fix: AddConField, SetConFieldType robustness May 9, 2022
@brprice brprice force-pushed the brprice/AddConField-fixes branch 2 times, most recently from e15f807 to e42b7a0 Compare May 9, 2022 17:59
@brprice brprice force-pushed the brprice/renamecon-case-branch branch from db70b29 to 7ee5a8b Compare May 10, 2022 12:40
brprice added 2 commits May 10, 2022 13:41
There are two fixes here. Firstly, ensure that updating case branches is
robust when the scrutinee is also updated (due to being an application
of the given constructor). Secondly, handle the case of an application
of a constructor of a parameterised type, i.e. where the spine includes
type applications.
The fix for AddConField and parameterised types from the previous commit
is also needed for SetConFieldType. (The other, about updating both a
case scrutinee and a case branch, is not, since the modification to the
scrutinee will not affect type inference.)
@brprice brprice force-pushed the brprice/AddConField-fixes branch from e42b7a0 to 4511478 Compare May 10, 2022 12:41
@brprice brprice added the Ready to merge Ready to merge label May 11, 2022
Base automatically changed from brprice/renamecon-case-branch to main May 11, 2022 15:53
mergify Bot added a commit that referenced this pull request May 11, 2022
@mergify mergify Bot merged commit 02035e0 into main May 11, 2022
@mergify mergify Bot deleted the brprice/AddConField-fixes branch May 11, 2022 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ready to merge Ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants