Panic with representation polymorphism checking and forall escape
This invalid program causes a crash in typeKind
during representation polymorphism checking in 9.4 and master:
{-# LANGUAGE DataKinds #-}
module M where
import GHC.Exts
f :: forall f g (a :: TYPE (f g)). Int -> a
f = f
x = f 0
GHC 9.2 gives a correct error
M.hs:9:1: error:
• Quantified type's kind mentions quantified type variable
type: ‘forall {k} {f :: k -> RuntimeRep} {g :: k}
{a :: TYPE (f g)}.
a’
Edited by Krzysztof Gogolewski