I'm researching to what extent singleton types can simulate dependent types and I've arrived at a problem. The minimal code I replicate the error with:
{-# LANGUAGE GADTs #-}
{-# LANGUAGE TypeInType #-}
import Data.Kind(Type)
data SBool :: Bool -> Type where
STrue :: SBool 'True
SFalse :: SBool 'False
data SSBool :: SBool b -> Type where
SSFalse :: SSBool 'SFalse
SSTrue :: SSBool 'STrue
The error message is:
Expected kind ‘SBool b’, but ‘'SFalse’ has kind ‘SBool 'False’