Module

Data.Typelevel.Bool

Package
purescript-typelevel
Repository
bodil/purescript-typelevel

#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

#BoolI Source

class BoolI b  where

Members

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

#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

#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

#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

#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

#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

#not Source

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

#and Source

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

#or Source

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

#xor Source

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

#imp Source

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

#eq Source

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