Safe Haskell | None |
---|---|

Language | Haskell2010 |

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 #

Var a | |

And [LBooleanFormula a] | |

Or [LBooleanFormula a] | |

Parens (LBooleanFormula a) |

Functor BooleanFormula # | |

Foldable BooleanFormula # | |

Traversable BooleanFormula # | |

Eq a => Eq (BooleanFormula a) # | |

Data a => Data (BooleanFormula a) # | |

OutputableBndr a => Outputable (BooleanFormula a) # | |

Binary a => Binary (BooleanFormula a) # | |

type LBooleanFormula a = Located (BooleanFormula a) #

mkFalse :: BooleanFormula a #

mkTrue :: BooleanFormula a #

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

mkOr :: Eq a => [LBooleanFormula 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 :: Uniquable 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 #