This works around a compilation performance regression in GHC 9.0.1: https://gitlab.haskell.org/ghc/ghc/-/issues/20261. This also speeds up compilation on other versions.