predicate-0.0.4: Predicates
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Predicate

Documentation

newtype PredicateT f a Source #

Constructors

PredicateT (a -> f Bool) 

Instances

Instances details
Contravariant (PredicateT f) Source # 
Instance details

Defined in Data.Predicate

Methods

contramap :: (a' -> a) -> PredicateT f a -> PredicateT f a' #

(>$) :: b -> PredicateT f b -> PredicateT f a #

Monad f => Decidable (PredicateT f) Source # 
Instance details

Defined in Data.Predicate

Methods

lose :: (a -> Void) -> PredicateT f a #

choose :: (a -> Either b c) -> PredicateT f b -> PredicateT f c -> PredicateT f a #

Monad f => Divisible (PredicateT f) Source # 
Instance details

Defined in Data.Predicate

Methods

divide :: (a -> (b, c)) -> PredicateT f b -> PredicateT f c -> PredicateT f a #

conquer :: PredicateT f a #

Monad f => Monoid (PredicateT f a) Source # 
Instance details

Defined in Data.Predicate

Methods

mempty :: PredicateT f a #

mappend :: PredicateT f a -> PredicateT f a -> PredicateT f a #

mconcat :: [PredicateT f a] -> PredicateT f a #

Monad f => Semigroup (PredicateT f a) Source # 
Instance details

Defined in Data.Predicate

Methods

(<>) :: PredicateT f a -> PredicateT f a -> PredicateT f a #

sconcat :: NonEmpty (PredicateT f a) -> PredicateT f a #

stimes :: Integral b => b -> PredicateT f a -> PredicateT f a #

predicateT :: Iso (PredicateT f a) (PredicateT f' a') (a -> f Bool) (a' -> f' Bool) Source #

predicate :: Iso (Predicate a) (Predicate a') (a -> Bool) (a' -> Bool) Source #

(.&&.) :: Monad f => PredicateT f a -> PredicateT f a -> PredicateT f a Source #

(.||.) :: Monad f => PredicateT f a -> PredicateT f a -> PredicateT f a Source #

(.->.) :: Monad f => PredicateT f a -> PredicateT f a -> PredicateT f a Source #

equals :: (Applicative f, Eq a) => a -> PredicateT f a Source #

notEquals :: (Applicative f, Eq a) => a -> PredicateT f a Source #

elem :: Eq a => Getting Any s a -> a -> Predicate s Source #

notElem :: Eq a => Getting All s a -> a -> Predicate s Source #

isInfixOf :: (Applicative f, Eq a) => [a] -> PredicateT f [a] Source #

isPrefixOf :: (Applicative f, Eq a) => [a] -> PredicateT f [a] Source #

isSuffixOf :: (Applicative f, Eq a) => [a] -> PredicateT f [a] Source #

isSubsequenceOf :: (Applicative f, Eq a) => [a] -> PredicateT f [a] Source #

find :: (Monad f, Foldable t) => PredicateT f a -> t a -> f (Maybe a) Source #

filter :: Applicative f => PredicateT f a -> [a] -> f [a] Source #

takeWhile :: Monad f => PredicateT f a -> [a] -> f [a] Source #

dropWhile :: Monad f => PredicateT f a -> [a] -> f [a] Source #