GHC bug! Heap Overflow error during Cabal Install - Panic! (the 'impossible' happened)
using: cabal install --ghc-options="+RTS -M2G" -j1 --force-reinstalls Agda Trying to install Agda 22.214.171.124 for about the fifth time.
The following was returned:
. . . [297 of 369] Compiling Agda. Typechecking.Rules.LHS.Unify ( src/full/Agda/TypeChecker: panic! (the 'impossible' happened) (GHC version 8.8.4 for x86_64-unknown-linux): heap overflow
Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug
cabal: Failed to build Agda-126.96.36.199
(Am using Ubuntu 20.04.01 LTS, I was trying to control the heap overflow problem with -M2G as I only have 4GB memory - I'm quite happy to leave it running for a few hours, but it should still work eventually!!)