Skip to content

panic: getIdFromTrivialExpr | Type families, generics, fundeps

This is on GHCi, version 8.6.5, in the file WorkingGenerics.hs

*Main> :load WorkingGenerics 
[1 of 1] Compiling WorkingGenerics  ( /home/bollu/work/paper-deltas/src/WorkingGenerics.hs, interpreted )
ghc: panic! (the 'impossible' happened)
  (GHC version 8.6.5 for x86_64-unknown-linux):
	getIdFromTrivialExpr
  (case a'_alGi of { })
  `cast` (Sym (Nth:2
                   (Nth:3
                        (Inst (Sym (N:GDiff[0] (Rep_Void[0])) ; N:GDiff[0]
                                                                    <Rep Void>_N) (Coh <Void>_N
                                                                                       (Sym (Nth:0
                                                                                                 (Sym (N:GDiff[0]
                                                                                                           (Rep_Void[0])) ; N:GDiff[0]
                                                                                                                                <Rep
                                                                                                                                   Void>_N)))))))
          :: Rep Void Void
             ~R# D1 ('MetaData "Void" "WorkingGenerics" "main" 'False) V1 Void)
  Call stack:
      CallStack (from HasCallStack):
        callStackDoc, called at compiler/utils/Outputable.hs:1160:37 in ghc:Outputable
        pprPanic, called at compiler/coreSyn/CoreUtils.hs:977:18 in ghc:CoreUtils

How to reproduce:

  1. Clone bollu/paper-deltas
  2. Run stack ghci
  3. run :load WorkingGenerics in GHCi

I'm sorry, I have no idea how to reduce this kind of bug.

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