Open m4dc4p opened 9 months ago
Thanks for flagging! Just to confirm, this is a regression, correct? Is there a ghc issue tracking this?
Yeh, under 9.6 this does not happen. I reported to GHC just after this as well - https://gitlab.haskell.org/ghc/ghc/-/issues/24462.
I've found that a module using barbies takes exponentially longer to compile under GHC 9.8 as I add fields to a data type.
The repo at https://github.com/m4dc4p/ghc98-bug demonstrates the problem. If you have GHC and cabal installed, you should be able to build with just
cabal build
:Uncommenting fields on the
HDKType
data constructor cause compilation to take longer and longer (and use more memory):Its worth noting the removing the deriving instance for
Eq
causes the problem to go away (but, of course, that instance is something we want). Also worth noting that with -O0, the problem goes away. I have not narrowed down which optimization is the problem.