Skip to content
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

Adapt to NuMatchingAny1 becoming a quantified constraint #1774

Merged
merged 1 commit into from
Dec 5, 2022
Merged

Conversation

RyanGlScott
Copy link
Contributor

This makes the necessary changes to adapt to eddywestbrook/hobbits#8, which turns NuMatchingAny1 into an alias for a quantified NuMatching constraint. See #1742 and https://gitlab.haskell.org/ghc/ghc/-/issues/22492 for the motivation behind this.

One unfortunate hiccup with this patch is that combining quantified superclasses and TypeFamilies doesn't quite work out of the box on pre-9.2 GHCs due to https://gitlab.haskell.org/ghc/ghc/-/issues/14860. As a result, I have to introduce explicit equality constraints to work around the issue. I have added a Note [QuantifiedConstraints + TypeFamilies trick] to describe why the workaround is necessary.

Credit goes to Matthew Pickering for helping me identify this issue and for authoring a separate fix. I have tweaked his fix and turned it into this patch, adding him as a co-author in the process.

Fixes #1742.

This makes the necessary changes to adapt to eddywestbrook/hobbits#8,
which turns `NuMatchingAny1` into an alias for a quantified `NuMatching`
constraint. See #1742 and https://gitlab.haskell.org/ghc/ghc/-/issues/22492 for
the motivation behind this.

One unfortunate hiccup with this patch is that combining quantified superclasses
and `TypeFamilies` doesn't quite work out of the box on pre-9.2 GHCs due to
https://gitlab.haskell.org/ghc/ghc/-/issues/14860. As a result, I have to
introduce explicit equality constraints to work around the issue. I have added
a `Note [QuantifiedConstraints + TypeFamilies trick]` to describe why the
workaround is necessary.

Credit goes to Matthew Pickering for helping me identify this issue and for
authoring a separate fix. I have tweaked his fix and turned it into this patch,
adding him as a co-author in the process.

Fixes #1742.

Co-authored-by: Matthew Pickering <matthewtpickering@gmail.com>
Copy link
Contributor

@eddywestbrook eddywestbrook left a comment

Choose a reason for hiding this comment

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

LGTM!

@RyanGlScott RyanGlScott added the PR: ready to merge Magic flag for pull requests to ask Mergify to merge given an approval and a successful CI run label Dec 5, 2022
@mergify mergify bot merged commit bde217a into master Dec 5, 2022
@mergify mergify bot deleted the T1742 branch December 5, 2022 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: ready to merge Magic flag for pull requests to ask Mergify to merge given an approval and a successful CI run
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Heapster programs <<loop>> when SAW is built with GHC 9.0+ (but not with GHC 8.10)
2 participants