Safe Haskell | None |
---|---|
Language | Haskell98 |
The IsFormula
class contains definitions for the boolean true
and false values, and methods for traversing the atoms of a formula.
- class (Ord atom, Show atom, HasFixity atom, Pretty atom) => IsAtom atom
- class (Pretty formula, HasFixity formula, IsAtom (AtomOf formula)) => IsFormula formula where
- (⊥) :: IsFormula p => p
- (⊤) :: IsFormula p => p
- fromBool :: IsFormula formula => Bool -> formula
- prettyBool :: Bool -> Doc
- atom_union :: (IsFormula formula, Ord r) => (AtomOf formula -> Set r) -> formula -> Set r
Documentation
class (Ord atom, Show atom, HasFixity atom, Pretty atom) => IsAtom atom Source
Basic properties of an atomic formula
class (Pretty formula, HasFixity formula, IsAtom (AtomOf formula)) => IsFormula formula where Source
Class associating a formula type with its atom (atomic formula) type.
AtomOf is a function that maps the formula type to the associated atomic formula type
The true element
The false element
asBool :: formula -> Maybe Bool Source
atomic :: AtomOf formula -> formula Source
Build a formula from an atom.
overatoms :: (AtomOf formula -> r -> r) -> formula -> r -> r Source
Formula analog of iterator foldr
.
onatoms :: (AtomOf formula -> AtomOf formula) -> formula -> formula Source
Apply a function to the atoms, otherwise keeping structure (new sig)
prettyBool :: Bool -> Doc Source