Skip to content

GHC 9 Support - #392

Merged
moodmosaic merged 2 commits into
hedgehogqa:masterfrom
utdemir:ghc9-support
Feb 8, 2021
Merged

moodmosaic merged 2 commits into
hedgehogqa:masterfrom
utdemir:ghc9-support

Conversation

@utdemir

@utdemir utdemir commented Aug 11, 2020

Copy link
Copy Markdown
Contributor

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

alexbiehl commented Feb 8, 2021 •

Copy link
Copy Markdown

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

@moodmosaic

Copy link
Copy Markdown
Member

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

@moodmosaic moodmosaic 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.

👍 /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 done
@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.

3 participants