module TypeLevel.Boolean ( True
, False
, Not
, notT
, And
, andT
, Or
, orT
, Xor
, xorT
) where
import TypeLevel.Reify
data True
data False
instance Show False where show _ = "False"
instance Show True where show _ = "True"
instance Reify True Bool where witness = Witness True
instance Reify False Bool where witness = Witness False
type family Not a :: *
notT :: a -> Not a
notT _ = undefined
type instance Not False = True
type instance Not True = False
type family And a b :: *
andT :: a -> b -> And a b
andT _ _ = undefined
type instance And False False = False
type instance And False True = False
type instance And True False = False
type instance And True True = True
type family Or a b :: *
orT :: a -> b -> Or a b
orT _ _ = undefined
type instance Or False False = True
type instance Or False True = True
type instance Or True False = True
type instance Or True True = False
type family Xor a b :: *
xorT :: a -> b -> Xor a b
xorT _ _ = undefined
type instance Xor False False = False
type instance Xor False True = True
type instance Xor True False = True
type instance Xor True True = False