cond-0.3: Basic conditional and boolean operators with monadic variants.

Safe HaskellSafe-Infered

Data.Algebra.Boolean

Synopsis

Documentation

class Boolean b whereSource

A class for boolean algebras. Instances of this class should obey all the axioms of boolean algebra.

Minimal complete definition: true, false, not or <-->, || or &&.

Methods

true :: bSource

Truth value.

false :: bSource

False value.

not :: b -> bSource

Logical negation.

(&&) :: b -> b -> bSource

Logical conjunction.

(||) :: b -> b -> bSource

Logical inclusive disjunction.

xor :: b -> b -> bSource

Logical exclusive disjunction.

(-->) :: b -> b -> bSource

Logical implication

(<-->) :: b -> b -> bSource

Logical biconditional

fromBool :: Boolean b => Bool -> bSource

Injection from Bool into a boolean algebra.