cmptype-0.1.0.1: Compare types of any kinds

Safe HaskellSafe
LanguageHaskell2010

Type.Compare

Synopsis

Documentation

type family CmpType (a :: k) (b :: k) :: Ordering where ... Source #

Compare two types. For Nats and Symbols, this uses the built-in comparisons. For all other types, Type.Compare.Plugin will solve it.

The actual meaning of comparing types is left to your imagination. But it's deterministic so that's good enough.

Equations

CmpType a a = EQ 
CmpType (a :: Nat) b = CmpNat a b 
CmpType (a :: Symbol) b = CmpSymbol a b