Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Control.Applicative.Logic
Synopsis
- any :: (Alternative f, Foldable t) => (a -> f b) -> t a -> f b
- or :: (Alternative f, Foldable t) => t (f a) -> f a
- all :: (Applicative f, Monoid b, Foldable t) => (a -> f b) -> t a -> f b
- and :: (Applicative f, Monoid a, Foldable t) => t (f a) -> f a
- (&&) :: (Applicative f, Monoid a) => f a -> f a -> f a
- convert :: (Alternative f, Foldable t) => t a -> f a
- class Foldable t => Searchable t
- search :: (Searchable t, Alternative f, Monoid b) => (a -> f b) -> t a -> f b
Documentation
any :: (Alternative f, Foldable t) => (a -> f b) -> t a -> f b Source #
Generalized version of any
. It takes a predicate that returns
generalised truth values in an Alternative
functor and applies it disjunctively to
a foldable structure. I.e. it applies the predicate and folds with |.
any :: (Alternative f, Foldable t) => (a -> f b) -> t a -> f b
@
or :: (Alternative f, Foldable t) => t (f a) -> f a Source #
Generalized version of the boolean or
to foldable structures of Alternative
functorial values.
It combines the elements using the alternative choice operator (<|>
).
or :: (Alternative f, Foldable t) => t (f a) -> f a
all :: (Applicative f, Monoid b, Foldable t) => (a -> f b) -> t a -> f b Source #
Generalized version of all
. It takes a predicate that gives generalized
truth values in an Applicative functor on a Monoid and applies it conjunctively to
a foldable structure. I.e. it applies the predicate and folds with an applicative
lifting of monoidal concatenation (<>
).
all :: (Applicative f, Monoid b, Foldable t) => (a -> f b) -> t a -> f b
and :: (Applicative f, Monoid a, Foldable t) => t (f a) -> f a Source #
Generalized version of the boolean and
to foldable structures of Applicative
functor applied to monoids. It combines the elements using the monoidal concatenation (<>
).
and :: (Applicative f, Monoid a, Foldable t) => t (f a) -> f a
(&&) :: (Applicative f, Monoid a) => f a -> f a -> f a Source #
convert :: (Alternative f, Foldable t) => t a -> f a Source #
Converts a foldable structure into an Alternative
functor, where each element is lifted into the
functor using pure
and then combined using the alternative choice operator (<|>
).
convert :: (Alternative f, Foldable t) => t a -> f a
class Foldable t => Searchable t Source #
Minimal complete definition
Instances
Searchable Maybe Source # | |
Defined in Control.Applicative.Logic |
search :: (Searchable t, Alternative f, Monoid b) => (a -> f b) -> t a -> f b Source #