panic when building haddock for ghc-check
Summary
While trying to build ghc-check 0.5.0.0 within nixpkgs I encounter the following error when generating haddocks.
Steps to reproduce
nix build .#haskell.packages.ghc942.ghc-check
on a current haskell-updates
branch of nixpkgs (bbd00e8632c).
build ends with:
ghc-check> haddockPhase
ghc-check> Preprocessing library for ghc-check-0.5.0.8..
ghc-check> Running Haddock on library for ghc-check-0.5.0.8..
ghc-check> Warning: --source-* options are ignored when --hyperlinked-source is enabled.
ghc-check> 75% ( 3 / 4) in 'GHC.Check.Executable'
ghc-check> Missing documentation for:
ghc-check> trim (src/GHC/Check/Executable.hs:25)
ghc-check>
ghc-check> <no location info>: error:
ghc-check> panic! (the 'impossible' happened)
ghc-check> GHC version 9.4.2:
ghc-check> hsExprType: Unexpected HsSpliceE
ghc-check> unTypeCode (liftSplice . pure $ TExp verLifted_agFU)
ghc-check> Call stack:
ghc-check> CallStack (from HasCallStack):
ghc-check> callStackDoc, called at compiler/GHC/Utils/Panic.hs:182:37 in ghc:GHC.Utils.Panic
ghc-check> pprPanic, called at compiler/GHC/Hs/Syn/Type.hs:134:30 in ghc:GHC.Hs.Syn.Type
ghc-check>
ghc-check> Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug
ghc-check>
ghc-check> haddock: Cannot typecheck modules
error: builder for '/nix/store/s3ahary8r0bysjpdzdafx9s2sp8vf151-ghc-check-0.5.0.8.drv' failed with exit code 1;
I realize, this is not a very nice reproducer, because it uses nix. If desired I can try to contribute to the debugging. Still the error told me to report this, so I did.