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

Safe HaskellSafe
LanguageHaskell2010

Type.Data.Bool

Documentation

data True #

Instances

Show True # 

Methods

showsPrec :: Int -> True -> ShowS #

show :: True -> String #

showList :: [True] -> ShowS #

type Not True # 
type Not True = False
type True :||: _x # 
type True :||: _x = True
type True :&&: x # 
type True :&&: x = x
type Compare False True # 
type Compare True False # 
type Compare True True # 
type If True y _z # 
type If True y _z = y

data False #

Instances

Show False # 

Methods

showsPrec :: Int -> False -> ShowS #

show :: False -> String #

showList :: [False] -> ShowS #

type Not False # 
type Not False = True
type False :||: x # 
type False :||: x = x
type False :&&: _x # 
type False :&&: _x = False
type Compare False False # 
type Compare False True # 
type Compare True False # 
type If False _y z # 
type If False _y z = z

type family Not x #

Instances

type Not False # 
type Not False = True
type Not True # 
type Not True = False

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

type family x :&&: y #

Instances

type False :&&: _x # 
type False :&&: _x = False
type True :&&: x # 
type True :&&: x = x

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

type family x :||: y #

Instances

type False :||: x # 
type False :||: x = x
type True :||: _x # 
type True :||: _x = True

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

type family If x y z #

Instances

type If False _y z # 
type If False _y z = z
type If True y _z # 
type If True y _z = y

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