Module

Data.Typelevel.Bool

Package
purescript-typelevel
Repository
bodil/purescript-typelevel

#BoolI Source

class BoolI b  where

Members

Instances

#Bool Source

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

#reifyBool Source

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 Source

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

#not Source

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

#And Source

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

#and Source

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

#Or Source

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

#or Source

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

#Xor Source

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

#xor Source

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

#Imp Source

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

#imp Source

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

#Eq Source

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

#eq Source

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