Panic with a bad hs-boot file
Given two files:
M.hs-boot
{-# LANGUAGE TypeFamilies #-}
module M where
import Data.Kind
type family T :: Type
f :: forall (x :: T). Maybe x
M.hs
module M where
attempting to compile ghc M.hs
crashes in 9.4 and above:
[1 of 2] Compiling M[boot] ( M.hs-boot, M.o-boot )
<no location info>: error:
panic! (the 'impossible' happened)
GHC version 9.7.20230606:
Can't serialise IfaceHoleCo