{-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeFamilies #-} import Data.Kind (Type) main :: IO () main = pure () -- Some type classes class Kinded x where type Kind x :: Type class Kinded x => Singlify x where data Singleton x :: Kind x -> Type -> Type -- CHANGE: added one Type here -- Now some instances for above data X data MyKind = A data Bla -- CHANGE: defined this here instance Kinded X where type Kind X = MyKind instance Singlify X where data Singleton X s t where -- CHANGE: added t SingA :: Singleton X 'A Bla -- CHANGE: added Bla {- note that the following alternatives do NOT work, the last one is interesting: SingA :: Singleton X 'A Int SingA :: Singleton X 'A String SingA :: Singleton X 'A Bool SingA :: Singleton X 'A X ... -}