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

Safe HaskellSafe-Inferred
LanguageHaskell2010

Type.Data.Bool

Documentation

data True Source

Instances

Show True 
Typeable * True 
type Not True = False 
type True :||: x = True 
type True :&&: x = x 
type Compare False True = LT 
type Compare True False = GT 
type Compare True True = EQ 
type If True y z = y 

data False Source

Instances

Show False 
Typeable * False 
type Not False = True 
type False :||: x = x 
type False :&&: x = False 
type Compare False False = EQ 
type Compare False True = LT 
type Compare True False = GT 
type If False y z = z 

type family Not x Source

Instances

type Not False = True 
type Not True = False 

not :: Proxy x -> Proxy (Not x) Source

type family x :&&: y Source

Instances

type False :&&: x = False 
type True :&&: x = x 

and :: Proxy x -> Proxy y -> Proxy (x :&&: y) Source

type family x :||: y Source

Instances

type False :||: x = x 
type True :||: x = True 

or :: Proxy x -> Proxy y -> Proxy (x :||: y) Source

type family If x y z Source

Instances

type If False y z = z 
type If True y z = y 

if_ :: Proxy x -> Proxy y -> Proxy z -> Proxy (If x y z) Source