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

Safe Haskell | Safe-Inferred
Language | Haskell2010

TypeLevel.Boolean

Contents

- Boolean operations

Synopsis

- data True
- data False
- type family Not a
- notT :: a -> Not a
- type family And a b
- andT :: a -> b -> And a b
- type family Or a b
- orT :: a -> b -> Or a b
- type family Xor a b
- xorT :: a -> b -> Xor a b

# Documentation

data True Source #

Data type for truth

#### Instances

Instances details

Show True Source # |
Instance details Defined in TypeLevel.Boolean Methods showsPrec :: Int -> True -> ShowS Source # show :: True -> String Source # showList :: [True] -> ShowS Source #
Reify True Bool Source # |
Instance details Defined in TypeLevel.Boolean Methods witness :: Witness True Bool Source #
type Not True Source # |
Instance details Defined in TypeLevel.Boolean type Not True = False
type And False True Source # |
Instance details Defined in TypeLevel.Boolean type And False True = False
type And True False Source # |
Instance details Defined in TypeLevel.Boolean type And True False = False
type And True True Source # |
Instance details Defined in TypeLevel.Boolean type And True True = True
type Or False True Source # |
Instance details Defined in TypeLevel.Boolean type Or False True = True
type Or True False Source # |
Instance details Defined in TypeLevel.Boolean type Or True False = True
type Or True True Source # |
Instance details Defined in TypeLevel.Boolean type Or True True = False
type Xor False True Source # |
Instance details Defined in TypeLevel.Boolean type Xor False True = True
type Xor True False Source # |
Instance details Defined in TypeLevel.Boolean type Xor True False = True
type Xor True True Source # |
Instance details Defined in TypeLevel.Boolean type Xor True True = False

data False Source #

Data type for false.

#### Instances

Instances details

Show False Source # |
Instance details Defined in TypeLevel.Boolean Methods showsPrec :: Int -> False -> ShowS Source # show :: False -> String Source # showList :: [False] -> ShowS Source #
Reify False Bool Source # |
Instance details Defined in TypeLevel.Boolean Methods witness :: Witness False Bool Source #
type Not False Source # |
Instance details Defined in TypeLevel.Boolean type Not False = True
type And False False Source # |
Instance details Defined in TypeLevel.Boolean type And False False = False
type And False True Source # |
Instance details Defined in TypeLevel.Boolean type And False True = False
type And True False Source # |
Instance details Defined in TypeLevel.Boolean type And True False = False
type Or False False Source # |
Instance details Defined in TypeLevel.Boolean type Or False False = True
type Or False True Source # |
Instance details Defined in TypeLevel.Boolean type Or False True = True
type Or True False Source # |
Instance details Defined in TypeLevel.Boolean type Or True False = True
type Xor False False Source # |
Instance details Defined in TypeLevel.Boolean type Xor False False = False
type Xor False True Source # |
Instance details Defined in TypeLevel.Boolean type Xor False True = True
type Xor True False Source # |
Instance details Defined in TypeLevel.Boolean type Xor True False = True

# Boolean operations

type family Not a Source #

Negation

#### Instances

Instances details

type Not False Source # |
Instance details Defined in TypeLevel.Boolean type Not False = True
type Not True Source # |
Instance details Defined in TypeLevel.Boolean type Not True = False

notT :: a -> Not a Source #

type family And a b Source #

And for boolean types

#### Instances

Instances details

type And False False Source # |
Instance details Defined in TypeLevel.Boolean type And False False = False
type And False True Source # |
Instance details Defined in TypeLevel.Boolean type And False True = False
type And True False Source # |
Instance details Defined in TypeLevel.Boolean type And True False = False
type And True True Source # |
Instance details Defined in TypeLevel.Boolean type And True True = True

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

type family Or a b Source #

Or for boolean types

#### Instances

Instances details

type Or False False Source # |
Instance details Defined in TypeLevel.Boolean type Or False False = True
type Or False True Source # |
Instance details Defined in TypeLevel.Boolean type Or False True = True
type Or True False Source # |
Instance details Defined in TypeLevel.Boolean type Or True False = True
type Or True True Source # |
Instance details Defined in TypeLevel.Boolean type Or True True = False

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

type family Xor a b Source #

Exlusive or for boolean types

#### Instances

Instances details

type Xor False False Source # |
Instance details Defined in TypeLevel.Boolean type Xor False False = False
type Xor False True Source # |
Instance details Defined in TypeLevel.Boolean type Xor False True = True
type Xor True False Source # |
Instance details Defined in TypeLevel.Boolean type Xor True False = True
type Xor True True Source # |
Instance details Defined in TypeLevel.Boolean type Xor True True = False

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