In a nix build I realised that compiling the testsuite takes huge amounts of memory (~6GB) and time (~2 minutes). I suspect the inliner is at fault, but you could probably compensate by attaching NOINLINEs to allLatticeLaws and friends. Maybe this is fixed in GHC 8.10.3 (https://gitlab.haskell.org/ghc/ghc/-/issues/18140), otherwise this is a GHC bug.
Or even simpler suggestion: {-# GHC_OPTIONS -O0 #-}. There shouldn't be much opportunity for optimisation anyway, or at least the time spent optimising will probably be longer than running the test suite once.
In a nix build I realised that compiling the testsuite takes huge amounts of memory (~6GB) and time (~2 minutes). I suspect the inliner is at fault, but you could probably compensate by attaching
NOINLINE
s toallLatticeLaws
and friends. Maybe this is fixed in GHC 8.10.3 (https://gitlab.haskell.org/ghc/ghc/-/issues/18140), otherwise this is a GHC bug.Or even simpler suggestion:
{-# GHC_OPTIONS -O0 #-}
. There shouldn't be much opportunity for optimisation anyway, or at least the time spent optimising will probably be longer than running the test suite once.