Skip to content

-O0 and pattern synonyms triggers panic in trimJoinCont

Running haddock on the `generics-mrsop` package results in

haddock: panic! (the 'impossible' happened)
  (GHC version 8.4.3 for x86_64-unknown-linux):
	completeCall

fail_av9P
Select nodup wild_00
Stop[BoringCtxt] Rep Singl (El FamRoseInt) (Lkup ix CodesRoseInt)
Call stack:
    CallStack (from HasCallStack):
      callStackDoc, called at compiler/utils/Outputable.hs:1150:37 in ghc:Outputable
      pprPanic, called at compiler/simplCore/Simplify.hs:1533:9 in ghc:Simplify

The same problem affects 8.6.1 and HEAD, but not 8.2.2.

The panic seems to stem from this catch-all in `trimJoinCont`.

Edited by Ryan Scott
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information