Cabal-2.0.1.0: A framework for packaging Haskell software

Safe HaskellNone
LanguageHaskell2010

Distribution.Types.Condition

Synopsis

Documentation

data Condition c #

A boolean expression parameterized over the variable type used.

Constructors

Var c 
Lit Bool 
CNot (Condition c) 
COr (Condition c) (Condition c) 
CAnd (Condition c) (Condition c) 

Instances

Monad Condition # 

Methods

(>>=) :: Condition a -> (a -> Condition b) -> Condition b #

(>>) :: Condition a -> Condition b -> Condition b #

return :: a -> Condition a #

fail :: String -> Condition a #

Functor Condition # 

Methods

fmap :: (a -> b) -> Condition a -> Condition b #

(<$) :: a -> Condition b -> Condition a #

Applicative Condition # 

Methods

pure :: a -> Condition a #

(<*>) :: Condition (a -> b) -> Condition a -> Condition b #

liftA2 :: (a -> b -> c) -> Condition a -> Condition b -> Condition c #

(*>) :: Condition a -> Condition b -> Condition b #

(<*) :: Condition a -> Condition b -> Condition a #

Foldable Condition # 

Methods

fold :: Monoid m => Condition m -> m #

foldMap :: Monoid m => (a -> m) -> Condition a -> m #

foldr :: (a -> b -> b) -> b -> Condition a -> b #

foldr' :: (a -> b -> b) -> b -> Condition a -> b #

foldl :: (b -> a -> b) -> b -> Condition a -> b #

foldl' :: (b -> a -> b) -> b -> Condition a -> b #

foldr1 :: (a -> a -> a) -> Condition a -> a #

foldl1 :: (a -> a -> a) -> Condition a -> a #

toList :: Condition a -> [a] #

null :: Condition a -> Bool #

length :: Condition a -> Int #

elem :: Eq a => a -> Condition a -> Bool #

maximum :: Ord a => Condition a -> a #

minimum :: Ord a => Condition a -> a #

sum :: Num a => Condition a -> a #

product :: Num a => Condition a -> a #

Traversable Condition # 

Methods

traverse :: Applicative f => (a -> f b) -> Condition a -> f (Condition b) #

sequenceA :: Applicative f => Condition (f a) -> f (Condition a) #

mapM :: Monad m => (a -> m b) -> Condition a -> m (Condition b) #

sequence :: Monad m => Condition (m a) -> m (Condition a) #

Alternative Condition # 

Methods

empty :: Condition a #

(<|>) :: Condition a -> Condition a -> Condition a #

some :: Condition a -> Condition [a] #

many :: Condition a -> Condition [a] #

MonadPlus Condition # 

Methods

mzero :: Condition a #

mplus :: Condition a -> Condition a -> Condition a #

Eq c => Eq (Condition c) # 

Methods

(==) :: Condition c -> Condition c -> Bool #

(/=) :: Condition c -> Condition c -> Bool #

Data c => Data (Condition c) # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Condition c -> c (Condition c) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Condition c) #

toConstr :: Condition c -> Constr #

dataTypeOf :: Condition c -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (Condition c)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Condition c)) #

gmapT :: (forall b. Data b => b -> b) -> Condition c -> Condition c #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Condition c -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Condition c -> r #

gmapQ :: (forall d. Data d => d -> u) -> Condition c -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Condition c -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Condition c -> m (Condition c) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Condition c -> m (Condition c) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Condition c -> m (Condition c) #

Show c => Show (Condition c) # 
Generic (Condition c) # 

Associated Types

type Rep (Condition c) :: * -> * #

Methods

from :: Condition c -> Rep (Condition c) x #

to :: Rep (Condition c) x -> Condition c #

Semigroup (Condition a) # 

Methods

(<>) :: Condition a -> Condition a -> Condition a #

sconcat :: NonEmpty (Condition a) -> Condition a #

stimes :: Integral b => b -> Condition a -> Condition a #

Monoid (Condition a) # 
Binary c => Binary (Condition c) # 

Methods

put :: Condition c -> Put #

get :: Get (Condition c) #

putList :: [Condition c] -> Put #

type Rep (Condition c) # 

cNot :: Condition a -> Condition a #

Boolean negation of a Condition value.

cAnd :: Condition a -> Condition a -> Condition a #

Boolean AND of two Condtion values.

cOr :: Eq v => Condition v -> Condition v -> Condition v #

Boolean OR of two Condition values.

simplifyCondition #

Arguments

:: Condition c 
-> (c -> Either d Bool)

(partial) variable assignment

-> (Condition d, [d]) 

Simplify the condition and return its free variables.