In haskell/cabal#9115, a new flag was discussed --with-repl which would render many of our rather hacky implementations superfluous.
Due to changes on how arguments are passed to ghc in cabal, cabal HEAD and the upcoming cabal 3.16 are currently completely incompatible with hie-bios and HLS.
To fix this, we update hie-bios to use --with-repl if the cabal version is new enough and the lib:Cabal version supports it.