ghc-7.8.4: 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

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

mkTrue :: BooleanFormula a

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

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

mkVar :: a -> BooleanFormula a

isFalse :: BooleanFormula a -> Bool

isTrue :: BooleanFormula a -> Bool

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

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

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

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

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

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

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