Skip to content

Avoid dropping super class dicts for the same class - #3461

Merged
LiamGoodacre merged 1 commit into
purescript:masterfrom
LiamGoodacre:fix/dropping-super-classes
Dec 2, 2018
Merged

Avoid dropping super class dicts for the same class#3461
LiamGoodacre merged 1 commit into
purescript:masterfrom
LiamGoodacre:fix/dropping-super-classes

Conversation

@LiamGoodacre

@LiamGoodacre LiamGoodacre commented Dec 1, 2018

Copy link
Copy Markdown
Member

Fixes #3431
Fixes #2959

@LiamGoodacre

LiamGoodacre commented Dec 1, 2018

Copy link
Copy Markdown
Member Author

Previously, if two super classes were for the same type class we would prefer the first one we see. This happened via all the unionWith (unionWith union) calls to combine instance contexts. Now we collect them all in a non empty list and do unionWith (unionWith (unionWith (<>)).

@garyb garyb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@LiamGoodacre
LiamGoodacre merged commit 04d53f2 into purescript:master Dec 2, 2018
@LiamGoodacre
LiamGoodacre deleted the fix/dropping-super-classes branch December 2, 2018 17:20
@garyb garyb mentioned this pull request Jan 12, 2019
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants