tfp-1.0.0.2: Type-level integers, booleans, lists using type families

Safe HaskellSafe
LanguageHaskell2010

Type.Data.Ord

Documentation

type family Compare x y Source

Instances

compare :: Proxy x -> Proxy y -> Proxy (Compare x y) Source

data LT Source

Instances

type IsGT LT = False Source 
type IsEQ LT = False Source 
type IsLT LT = True Source 
type Compare GT LT = GT Source 
type Compare EQ LT = GT Source 
type Compare LT GT = LT Source 
type Compare LT EQ = LT Source 
type Compare LT LT = EQ Source 

data EQ Source

Instances

type IsGT EQ = False Source 
type IsEQ EQ = True Source 
type IsLT EQ = False Source 
type Compare GT EQ = GT Source 
type Compare EQ GT = LT Source 
type Compare EQ EQ = EQ Source 
type Compare EQ LT = GT Source 
type Compare LT EQ = LT Source 

data GT Source

Instances

type IsGT GT = True Source 
type IsEQ GT = False Source 
type IsLT GT = False Source 
type Compare GT GT = EQ Source 
type Compare GT EQ = GT Source 
type Compare GT LT = GT Source 
type Compare EQ GT = LT Source 
type Compare LT GT = LT Source 

type family IsLT c Source

Instances

type IsLT GT = False Source 
type IsLT EQ = False Source 
type IsLT LT = True Source 

isLT :: Proxy c -> Proxy (IsLT c) Source

type family IsEQ c Source

Instances

type IsEQ GT = False Source 
type IsEQ EQ = True Source 
type IsEQ LT = False Source 

isEQ :: Proxy c -> Proxy (IsEQ c) Source

type family IsGT c Source

Instances

type IsGT GT = True Source 
type IsGT EQ = False Source 
type IsGT LT = False Source 

isGT :: Proxy c -> Proxy (IsGT c) Source

class x :<: y Source

lt :: Proxy x -> Proxy y -> Proxy (LTT x y) Source

type family LTT x y Source

Instances

type LTT x y = IsLT (Compare x y) Source 

class x :<=: y Source

le :: Proxy x -> Proxy y -> Proxy (LET x y) Source

type family LET x y Source

Instances

type LET x y = Not (GTT x y) Source 

class x :==: y Source

eq :: Proxy x -> Proxy y -> Proxy (EQT x y) Source

type family EQT x y Source

Instances

type EQT x y = IsEQ (Compare x y) Source 

class x :/=: y Source

ne :: Proxy x -> Proxy y -> Proxy (NET x y) Source

type family NET x y Source

Instances

type NET x y = Not (EQT x y) Source 

class x :>=: y Source

ge :: Proxy x -> Proxy y -> Proxy (GET x y) Source

type family GET x y Source

Instances

type GET x y = Not (LTT x y) Source 

class x :>: y Source

gt :: Proxy x -> Proxy y -> Proxy (GTT x y) Source

type family GTT x y Source

Instances

type GTT x y = IsGT (Compare x y) Source 

type family Min x y Source

Instances

type Min x y = If (LET x y) x y Source 

min :: Proxy x -> Proxy y -> Proxy (Min x y) Source

type family Max x y Source

Instances

type Max x y = If (GET x y) x y Source 

max :: Proxy x -> Proxy y -> Proxy (Max x y) Source