type-level-numbers-0.1.1.1: Type level numbers implemented using type families.

Safe HaskellSafe
LanguageHaskell98

TypeLevel.Boolean

Contents

Synopsis

Documentation

data True #

Data type for truth

Instances

Show True # 

Methods

showsPrec :: Int -> True -> ShowS #

show :: True -> String #

showList :: [True] -> ShowS #

Reify True Bool # 
type Not True # 
type Not True = False
type Xor False True # 
type Xor True False # 
type Xor True True # 
type Or False True # 
type Or False True = True
type Or True False # 
type Or True False = True
type Or True True # 
type Or True True = False
type And False True # 
type And True False # 
type And True True # 
type And True True = True

data False #

Data type for false.

Instances

Show False # 

Methods

showsPrec :: Int -> False -> ShowS #

show :: False -> String #

showList :: [False] -> ShowS #

Reify False Bool # 
type Not False # 
type Not False = True
type Xor False False # 
type Xor False True # 
type Xor True False # 
type Or False False # 
type Or False True # 
type Or False True = True
type Or True False # 
type Or True False = True
type And False False # 
type And False True # 
type And True False # 

Boolean operations

type family Not a :: * #

Negation

Instances

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

notT :: a -> Not a #

type family And a b :: * #

And for boolean types

Instances

type And False False # 
type And False True # 
type And True False # 
type And True True # 
type And True True = True

andT :: a -> b -> And a b #

type family Or a b :: * #

Or for boolean types

Instances

type Or False False # 
type Or False True # 
type Or False True = True
type Or True False # 
type Or True False = True
type Or True True # 
type Or True True = False

orT :: a -> b -> Or a b #

type family Xor a b :: * #

Exlusive or for boolean types

Instances

type Xor False False # 
type Xor False True # 
type Xor True False # 
type Xor True True # 

xorT :: a -> b -> Xor a b #