So what happens when a new GHC version is released? It depends on the
version of the base package, which it ships. When the base package doesn't
get an API-breaking change, then all is well.
There's an implicit contract that such major changes will be guarded behind an epoch version bump, so you'll see many packages depending on `base < 5`.
When it *does* have such a change, all the Hackage packages must be checked
for compatibility with the new compiler version, and the upper bound of the
base package version must be adjusted. That sounds like a lot of effort. It
would be major happening in the Haskell community.
See
https://ghc.gitlab.haskell.org/head.hackage/ . In short, a large proportion of Hackage (I think corresponding to the most recent Stackage LTS?) is tested regularly, and needed changes to packages are made as overlays in head.hackage and submitted upstream before releases.