$ cabal v2-test
panic! read @TestSuiteLog ""
CallStack (from HasCallStack):
error, called at libraries/Cabal/Cabal/src/Distribution/Simple/Test/LibV09.hs:133:34 in Cabal-3.8.1.0:Distribution.Simple.Test.LibV09
Error: cabal: Tests failed for test:test-text from replace-megaparsec-2.0.0.0.
How can I get some better callstack information about this error?
$cabal v2-test
src/Replace/Megaparsec/Internal/ByteString.hs:19:8: error:
Failed to load dynamic interface file for Prelude:
Bad interface file: /nix/store/jflrijifpjbl8bh4vcl3fxhzfiv26qdf-ghc-9.4.3/lib/ghc-9.4.3/base-4.17.0.0/Prelude.p_dyn_hi
/nix/store/jflrijifpjbl8bh4vcl3fxhzfiv26qdf-ghc-9.4.3/lib/ghc-9.4.3/base-4.17.0.0/Prelude.p_dyn_hi: openBinaryFile: does not exist (No such file or directory)
Thanks for the advice about detailed-0.9@robx . I switched to exitcode-stdio-1.0 with HSpec. That gave me a slightly better error message:
test: internal error: Oops! Entered absent arg Arg: $dOrd
Type: Ord e
In module `Replace.Megaparsec'
(GHC version 9.4.3 for x86_64_unknown_linux)
Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug
Then I upgraded GHC from v9.4.3 to v9.4.4 and the error went away and the whole test suite passed. So I guess it was some GHC problem which was fixed in v9.4.4.