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

GHC 9 Support #392

Merged
merged 2 commits into from
Feb 8, 2021
Merged

GHC 9 Support #392

merged 2 commits into from
Feb 8, 2021

Conversation

utdemir
Copy link
Contributor

@utdemir utdemir commented Aug 11, 2020

This PR makes Hedgehog compile with the current GHC development branch (soon to be GHC 9). It only required two minor changes on hedgehog side:

  • Use Data.Kind.Type instead of *
  • Supporting template-haskell 2.17

See the commit messages for a bit more details.

These changes should be enough from the hedgehog side, but even after these:

  • --allow-newer flag has to be passed since primitive has an overly restrictive upper bound on base.
  • QuickCheck does not compile yet, so hedgehog-quickcheck does not work yet.

I tried to keep the changes as small as possible while maintaining the backwards compatibility, however I did only check with GHC 8.10 and GHC 9. Let me know if there is anything else I should do to get it compatible with even older GHC versions.

Using * alias for Data.Kind.Type is being deprecated, and from
GHC 9.0 it requires another language extension (`StarIsType`).
This version of TH comes with an API change where the return type
of the typed splices are wrapped with a type called `Code`. Unfortunately,
this requires conditional compilation.

Details: https://gitlab.haskell.org/ghc/ghc/-/commit/a625719284db7c69fa3d122e829291a16960e85f
@alexbiehl
Copy link

alexbiehl commented Feb 8, 2021

With GHC-9.0.1 released it would be great if this PR could be merged.

@moodmosaic
Copy link
Member

Thank you, @utdemir, we apologize for the radio silence. This should be out on the next release (coming soon) 🚀

Copy link
Member

@moodmosaic moodmosaic left a comment

Choose a reason for hiding this comment

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

👍 /cc co-reviewed @jacobstanley

@moodmosaic moodmosaic merged commit e0233ad into hedgehogqa:master Feb 8, 2021
@robrix robrix mentioned this pull request Feb 10, 2021
6 tasks
@moodmosaic moodmosaic mentioned this pull request Mar 2, 2021
@jacobstanley jacobstanley mentioned this pull request Mar 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants