ideas-1.5: Feedback services for intelligent tutoring systems

Maintainerbastiaan.heeren@ou.nl
Stabilityprovisional
Portabilityportable (depends on ghc)
Safe HaskellNone
LanguageHaskell98

Ideas.Common.Algebra.Boolean

Contents

Description

 

Synopsis

Boolean algebra

class BoolValue a where Source

Minimal complete definition

isTrue, isFalse

Methods

true :: a Source

false :: a Source

fromBool :: Bool -> a Source

isTrue :: a -> Bool Source

isFalse :: a -> Bool Source

class BoolValue a => Boolean a where Source

Methods

(<&&>) :: a -> a -> a Source

(<||>) :: a -> a -> a Source

complement :: a -> a Source

ands :: Boolean a => [a] -> a Source

ors :: Boolean a => [a] -> a Source

implies :: Boolean a => a -> a -> a Source

equivalent :: Boolean a => a -> a -> a Source

CoBoolean (matching)

class BoolValue a => CoBoolean a where Source

Methods

isAnd :: a -> Maybe (a, a) Source

isOr :: a -> Maybe (a, a) Source

isComplement :: a -> Maybe a Source

conjunctions :: CoBoolean a => a -> [a] Source

disjunctions :: CoBoolean a => a -> [a] Source

Monoids monoid

class MonoidZero a => DualMonoid a where Source

Methods

(><) :: a -> a -> a Source

dualCompl :: a -> a Source

Instances

newtype And a Source

Constructors

And 

Fields

fromAnd :: a
 

newtype Or a Source

Constructors

Or 

Fields

fromOr :: a