BooleanFormula

ghc-8.4.0.20171214: The GHC API

Safe Haskell | None
Language | Haskell2010

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 [LBooleanFormula a] |
Or [LBooleanFormula a] |
Parens (LBooleanFormula a) |

Instances

Functor BooleanFormula # |
Instance details Methods fmap :: (a -> b) -> BooleanFormula a -> BooleanFormula b Source # (<$) :: a -> BooleanFormula b -> BooleanFormula a Source #
Foldable BooleanFormula # |
Instance details Methods fold :: Monoid m => BooleanFormula m -> m Source # foldMap :: Monoid m => (a -> m) -> BooleanFormula a -> m Source # foldr :: (a -> b -> b) -> b -> BooleanFormula a -> b Source # foldr' :: (a -> b -> b) -> b -> BooleanFormula a -> b Source # foldl :: (b -> a -> b) -> b -> BooleanFormula a -> b Source # foldl' :: (b -> a -> b) -> b -> BooleanFormula a -> b Source # foldr1 :: (a -> a -> a) -> BooleanFormula a -> a Source # foldl1 :: (a -> a -> a) -> BooleanFormula a -> a Source # toList :: BooleanFormula a -> [a] Source # null :: BooleanFormula a -> Bool Source # length :: BooleanFormula a -> Int Source # elem :: Eq a => a -> BooleanFormula a -> Bool Source # maximum :: Ord a => BooleanFormula a -> a Source # minimum :: Ord a => BooleanFormula a -> a Source # sum :: Num a => BooleanFormula a -> a Source # product :: Num a => BooleanFormula a -> a Source #
Traversable BooleanFormula # |
Instance details Methods traverse :: Applicative f => (a -> f b) -> BooleanFormula a -> f (BooleanFormula b) Source # sequenceA :: Applicative f => BooleanFormula (f a) -> f (BooleanFormula a) Source # mapM :: Monad m => (a -> m b) -> BooleanFormula a -> m (BooleanFormula b) Source # sequence :: Monad m => BooleanFormula (m a) -> m (BooleanFormula a) Source #
Eq a => Eq (BooleanFormula a) # |
Instance details Methods (==) :: BooleanFormula a -> BooleanFormula a -> Bool # (/=) :: BooleanFormula a -> BooleanFormula a -> Bool #
Data a => Data (BooleanFormula a) # |
Instance details Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> BooleanFormula a -> c (BooleanFormula a) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (BooleanFormula a) Source # toConstr :: BooleanFormula a -> Constr Source # dataTypeOf :: BooleanFormula a -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (BooleanFormula a)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (BooleanFormula a)) Source # gmapT :: (forall b. Data b => b -> b) -> BooleanFormula a -> BooleanFormula a Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> BooleanFormula a -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> BooleanFormula a -> r Source # gmapQ :: (forall d. Data d => d -> u) -> BooleanFormula a -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> BooleanFormula a -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> BooleanFormula a -> m (BooleanFormula a) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> BooleanFormula a -> m (BooleanFormula a) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> BooleanFormula a -> m (BooleanFormula a) Source #
OutputableBndr a => Outputable (BooleanFormula a) # |
Instance details Methods ppr :: BooleanFormula a -> SDoc Source # pprPrec :: Rational -> BooleanFormula a -> SDoc Source #
Binary a => Binary (BooleanFormula a) # |
Instance details Methods put_ :: BinHandle -> BooleanFormula a -> IO () Source # put :: BinHandle -> BooleanFormula a -> IO (Bin (BooleanFormula a)) Source # get :: BinHandle -> IO (BooleanFormula a) Source #

type LBooleanFormula a = Located (BooleanFormula a) Source #

mkFalse :: BooleanFormula a Source #

mkTrue :: BooleanFormula a Source #

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

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