BooleanFormula

ghc-7.8.2: The GHC API

Safe Haskell | None
Language | Haskell98

BooleanFormula

Description

Boolean formulas without quantifiers and without negation. Such a formula consists of variables, conjunctions (and), and disjunctions (or).

This module is used to represent minimal complete definitions for classes.

# Documentation

data BooleanFormula a Source

Constructors

Var a |
And [BooleanFormula a] |
Or [BooleanFormula a] |

Instances

Functor BooleanFormula |
Foldable BooleanFormula |
Traversable BooleanFormula |
Eq a => Eq (BooleanFormula a) |
Data a => Data (BooleanFormula a) |
Outputable a => Outputable (BooleanFormula a) |
Binary a => Binary (BooleanFormula a) |
Typeable (* -> *) BooleanFormula |

mkFalse :: BooleanFormula a Source

mkTrue :: BooleanFormula a Source

mkAnd :: Eq a => [BooleanFormula a] -> BooleanFormula a Source

mkOr :: Eq a => [BooleanFormula a] -> BooleanFormula a Source

mkVar :: a -> BooleanFormula a Source

isFalse :: BooleanFormula a -> Bool Source

isTrue :: BooleanFormula a -> Bool Source

eval :: (a -> Bool) -> BooleanFormula a -> Bool Source

simplify :: Eq a => (a -> Maybe Bool) -> BooleanFormula a -> BooleanFormula a Source

isUnsatisfied :: Eq a => (a -> Bool) -> BooleanFormula a -> Maybe (BooleanFormula a) Source

implies :: Eq a => BooleanFormula a -> BooleanFormula a -> Bool Source

impliesAtom :: Eq a => BooleanFormula a -> a -> Bool Source

pprBooleanFormula :: (Rational -> a -> SDoc) -> Rational -> BooleanFormula a -> SDoc Source

pprBooleanFormulaNice :: Outputable a => BooleanFormula a -> SDoc Source