<div dir="ltr">I'm getting the following error message from a GHC plugin I'm developing (note GHC version):<br><br>    ghc-stage2: panic! (the 'impossible' happened)<br>      (GHC version 8.1.20160307 for x86_64-apple-darwin):<br>            opt_univ fell into a hole {aD1S}<br><br>I don't get this error when compiling without my plugin, so I may well be violating a compiler invariant.<br><br>Shortly before the error, the plugin produced the following dictionary expression, which does indeed contain a `UnivCo` with a `HoleProv`. The plugin does sometimes generate `UnivCo`s but not with `HoleProv`.<br><br>    let {<br>      $dHasRep_aD1T :: HasRep (Vec 'Z s_aD1R[fuv:0])<br>      $dHasRep_aD1T = $fHasRepVec0 @ s_aD1R[fuv:0] } in<br>    let {<br>      $dHasRepZLVeczqZZZLKeyhZRZR_Ii5CR :: HasRep (Vec 'Z (Key h_aCnh))<br>      $dHasRepZLVeczqZZZLKeyhZRZR_Ii5CR =<br>        $dHasRep_aD1T<br>        `cast` ((HasRep<br>                   (Vec<br>                      <'Z>_N<br>                      (Sym U(hole:{aD1S}, Key h_aCnh, s_aD1R[fuv:0])_N))_N)_R<br>                :: HasRep (Vec 'Z s_aD1R[fuv:0])<br>                   ~R# HasRep (Vec 'Z (Key h_aCnh))) } in<br>    $dHasRepZLVeczqZZZLKeyhZRZR_Ii5CR<br><br>Here, `Key` is a type family from `Data.Key` in the keys package, and `Vec` is a GADT of statically length-indexed lists.<br><br>Suggestions?<br><br>Thanks, - Conal<br></div>