{-# LANGUAGE DataKinds #-} module Comparable where import Data.Kind (Type) data FunctionArgument = ArgLiteral ComparableSansPath type Comparable = Comparable_ S type ComparableSansPath = forall s. Comparable_ s data Sub = S data Comparable_ :: Sub -> Type where CmpNumber :: Int -> Comparable_ s CmpString :: String -> Comparable_ s CmpBool :: Bool -> Comparable_ s CmpNull :: Comparable_ s CmpPath :: SingularPath -> Comparable_ S data SingularPath = SingularPath String -- Compiles test1 :: FunctionArgument test1 = ArgLiteral CmpNull -- Does not compile --test2 :: FunctionArgument --test2 = ArgLiteral (CmpPath (SingularPath ""))