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

Support template-haskell-2.21.0.0 #16

Closed
wants to merge 1 commit into from

Conversation

locallycompact
Copy link

@locallycompact locallycompact commented Oct 7, 2023

@RyanGlScott
Copy link
Member

The log you linked indicates that you are using GHC 9.9. Note that at present, both GHC 9.8 (which is soon to be released) and 9.9 bundle a copy of template-haskell that is called template-haskell-2.21.0.0, but these are not actually the same version of the library. The GHC 9.9 version of template-haskell introduced a breaking API change to the type of Code in template-haskell in this commit, which has not yet been reflected with a major version bump in the template-haskell library. (I'd expect the GHC maintainers to bump the template-haskell version to 2.22.0.0 shortly before GHC 9.10 is released.)

This means that guarding against this change with MIN_VERSION_template_haskell(2,21,0) is not correct, as that will then cause the library to fail to build with GHC 9.8. For this reason, the head.hackage patch for th-compat guards against this change using #if __GLASGOW_HASKELL__ >= 909 instead. This is a bit hacky, of course, but for the reasons mentioned above, we can't yet use something like MIN_VERSION_template_haskell(2,22,0).

I'd prefer to wait until template-haskell-2.22.0.0 is available before adding CPP to accommodate this. In the meantime, head.hackage offers a patched version of th-compat.

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.

2 participants