Did GHC 9 change ordering requirements for TH?

I’ve seen that a stable stackage for GHC 9 was finally release, so I switched a not-entirely trivial project of mine over to it.

What I see is that there were some changes related to template-haskell-generated instances, that require a more strict ordering in the source code of the instance vs. its usage. However, I couldn’t see a clear note of this in the release notes - is it a known issue?

1 Like

I found this in the highlights of GHC 9.0.1:

Breaking change: Template Haskell splices now act as separation points between constraint solving passes. It is no longer possible to use an instance of a class before a splice and define that instance after a splice. For example, …

3 Likes

Argh, how could I miss that? I went more through the details, but also skimmed the highlights.

OK, then I need to reorg some code. Thanks for the fast response!