boolean-normal-forms-0.0.0.2: Boolean normal form: NNF, DNF & CNF

Data.Algebra.Boolean.CoBoolean

Description

Synopsis

# Documentation

class CoBoolean a where Source #

A class to values translable to booleans.

Minimal complete definition

toBoolean

Methods

toBoolean :: Boolean b => a -> b Source #

Cast value to Boolean.

Instances

 Source # MethodstoBoolean :: Boolean b => Bool -> b Source # Source # MethodstoBoolean :: Boolean b => Maybe a -> b Source # CoBoolean (Neg a) Source # MethodstoBoolean :: Boolean b => Neg a -> b Source # Source # MethodstoBoolean :: Boolean b => FreeBoolean a -> b Source # CoBoolean a => CoBoolean (NNF a) Source # MethodstoBoolean :: Boolean b => NNF a -> b Source # CoBoolean a => CoBoolean (NNF a) Source # MethodstoBoolean :: Boolean b => NNF a -> b Source # CoBoolean a => CoBoolean (DNF a) Source # MethodstoBoolean :: Boolean b => DNF a -> b Source # CoBoolean a => CoBoolean (DNF a) Source # MethodstoBoolean :: Boolean b => DNF a -> b Source # CoBoolean a => CoBoolean (CNF a) Source # MethodstoBoolean :: Boolean b => CNF a -> b Source # CoBoolean a => CoBoolean (CNF a) Source # MethodstoBoolean :: Boolean b => CNF a -> b Source # (CoBoolean f, CoBoolean g) => CoBoolean (Either f g) Source # MethodstoBoolean :: Boolean b => Either f g -> b Source #

class CoBoolean1 b where Source #

A polymorphic class of values translable to booleans.

Minimal complete definition

toBooleanWith

Methods

toBooleanWith :: Boolean c => (a -> c) -> b a -> c Source #

Cast value to Boolean.

Instances

 Source # MethodstoBooleanWith :: Boolean c => (a -> c) -> Maybe a -> c Source # Source # MethodstoBooleanWith :: Boolean c => (a -> c) -> Neg a -> c Source # Source # MethodstoBooleanWith :: Boolean c => (a -> c) -> FreeBoolean a -> c Source # Source # MethodstoBooleanWith :: Boolean c => (a -> c) -> NNF a -> c Source # Source # MethodstoBooleanWith :: Boolean c => (a -> c) -> NNF a -> c Source # Source # MethodstoBooleanWith :: Boolean c => (a -> c) -> DNF a -> c Source # Source # MethodstoBooleanWith :: Boolean c => (a -> c) -> DNF a -> c Source # Source # MethodstoBooleanWith :: Boolean c => (a -> c) -> CNF a -> c Source # Source # MethodstoBooleanWith :: Boolean c => (a -> c) -> CNF a -> c Source #

toBool :: CoBoolean a => a -> Bool Source #

Less polymorphic version of toBoolean.

toBoolWith :: CoBoolean1 b => (a -> Bool) -> b a -> Bool Source #

Less polymorphic version of toBooleanWith.