[GHC] #12234: 'deriving Eq' on recursive datatype makes ghc eat a lot of CPU and RAM