Module

Data.Typelevel.Bool

#trueT

#falseT

#Bool

class (BoolI b) <= Bool b 

A type level boolean constraint.

Use (Bool b) => b to express that the type b must be either True or False.

Instances

#BoolI

class BoolI b  where

Members

Instances

#reifyBool

reifyBool :: forall r. Boolean -> (forall b. Bool b => b -> r) -> r

Convert a value level boolean into a type level boolean through a callback function.

#Not

class (BoolI b1, BoolI b2) <= Not b1 b2 | b1 -> b2, b2 -> b1

Type level logical not.

(Not a b) => a -> b applies the constraint that a and b must be logical opposites.

Instances

#And

class (BoolI b1, BoolI b2, BoolI b3) <= And b1 b2 b3 | b1 b2 -> b3

Type level logical and.

(And a b c) => a -> b -> c applies the constraint that c must be the result of applying a logical and operation to a and b.

Instances

#Or

class (BoolI b1, BoolI b2, BoolI b3) <= Or b1 b2 b3 | b1 b2 -> b3

Type level logical or.

(Or a b c) => a -> b -> c applies the constraint that c must be the result of applying a logical or operation to a and b.

Instances

#Xor

class (BoolI b1, BoolI b2, BoolI b3) <= Xor b1 b2 b3 | b1 b2 -> b3

Type level logical xor.

(Xor a b c) => a -> b -> c applies the constraint that c must be the result of applying a logical xor operation to a and b.

Instances

#Imp

class (BoolI b1, BoolI b2, BoolI b3) <= Imp b1 b2 b3 | b1 b2 -> b3

Type level logical implication.

(Imp a b c) => a -> b -> c applies the constraint that c must be the result of applying a logical implication operation to a and b.

Instances

#Eq

class (BoolI b1, BoolI b2, BoolI b3) <= Eq b1 b2 b3 | b1 b2 -> b3

Boolean equality check.

(Eq a b c) => a -> b -> c applies the constraint that c must be the result of testing whether a and b are equal.

Instances

#not

not :: forall b1 b2. Not b1 b2 => b1 -> b2

#and

and :: forall b1 b2 b3. And b1 b2 b3 => b1 -> b2 -> b3

#or

or :: forall b1 b2 b3. Or b1 b2 b3 => b1 -> b2 -> b3

#xor

xor :: forall b1 b2 b3. Xor b1 b2 b3 => b1 -> b2 -> b3

#imp

imp :: forall b1 b2 b3. Imp b1 b2 b3 => b1 -> b2 -> b3

#eq

eq :: forall b1 b2 b3. Eq b1 b2 b3 => b1 -> b2 -> b3

Modules