# Did GHC 9 change ordering requirements for TH?

**URL:** <https://discourse.haskell.org/t/did-ghc-9-change-ordering-requirements-for-th/4231>\
**Category:** Uncategorized\
**Created:** [March 19, 2022, 8:02pm UTC](https://discourse.haskell.org/t/did-ghc-9-change-ordering-requirements-for-th/4231 "2022-03-19T20:02:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![iustin](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/iustin/32/420_2.png) [@iustin](https://discourse.haskell.org/u/iustin)\
**Post date:** [March 19, 2022, 8:02pm UTC](https://discourse.haskell.org/t/did-ghc-9-change-ordering-requirements-for-th/4231/1 "2022-03-19T20:02:32Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![jaror](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/jaror/32/3271_2.png) [@jaror](https://discourse.haskell.org/u/jaror)\
**Post date:** [March 19, 2022, 8:08pm UTC](https://discourse.haskell.org/t/did-ghc-9-change-ordering-requirements-for-th/4231/2 "2022-03-19T20:08:39Z")

</div>

I found this in the [highlights](https://downloads.haskell.org/ghc/9.0.1/docs/html/users_guide/9.0.1-notes.html#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, …

---

<div class="post-metadata">

**Author:** ![iustin](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/iustin/32/420_2.png) [@iustin](https://discourse.haskell.org/u/iustin)\
**Post date:** [March 19, 2022, 8:14pm UTC](https://discourse.haskell.org/t/did-ghc-9-change-ordering-requirements-for-th/4231/3 "2022-03-19T20:14:50Z")

</div>

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!
