grisette-0.7.0.0: Symbolic evaluation as a library
Copyright(c) Sirui Lu 2021-2024
LicenseBSD-3-Clause (see the LICENSE file)
Maintainersiruilu@cs.washington.edu
StabilityExperimental
PortabilityGHC only
Safe HaskellSafe-Inferred
LanguageHaskell2010

Grisette.Unified.Lib.Data.Foldable

Description

 
Synopsis

Documentation

symElem :: forall mode t a. (Foldable t, EvalMode mode, UnifiedSymEq mode a) => a -> t a -> GetBool mode Source #

elem with symbolic equality.

symMaximum :: forall mode a t. (Foldable t, Mergeable a, UnifiedSymOrd mode a, UnifiedITEOp mode a, EvalMode mode) => t a -> a Source #

maximum with result merged with ITEOp.

mrgMaximum :: forall mode a t m. (Foldable t, MonadWithMode mode m, Mergeable a, UnifiedSymOrd mode a) => t a -> m a Source #

maximum with unified comparison.

symMinimum :: forall mode a t. (Foldable t, Mergeable a, UnifiedSymOrd mode a, UnifiedITEOp mode a, EvalMode mode) => t a -> a Source #

maximum with result merged with ITEOp.

mrgMinimum :: forall mode a t m. (Foldable t, MonadWithMode mode m, Mergeable a, UnifiedSymOrd mode a) => t a -> m a Source #

minimum with MergingStrategy knowledge propagation.

Special biased folds

mrgFoldrM :: (MonadTryMerge m, Mergeable b, Foldable t) => (a -> b -> m b) -> b -> t a -> m b Source #

foldrM with MergingStrategy knowledge propagation.

mrgFoldlM :: (MonadTryMerge m, Mergeable b, Foldable t) => (b -> a -> m b) -> b -> t a -> m b Source #

foldlM with MergingStrategy knowledge propagation.

Folding actions

Applicative actions

mrgTraverse_ :: (Applicative m, TryMerge m, Foldable t) => (a -> m b) -> t a -> m () Source #

traverse_ with MergingStrategy knowledge propagation.

mrgFor_ :: (Applicative m, TryMerge m, Foldable t) => t a -> (a -> m b) -> m () Source #

for_ with MergingStrategy knowledge propagation.

mrgSequenceA_ :: (Foldable t, TryMerge m, Applicative m) => t (m a) -> m () Source #

sequence_ with MergingStrategy knowledge propagation.

mrgAsum :: (Alternative f, TryMerge f, Mergeable a, Foldable t) => t (f a) -> f a Source #

asum with MergingStrategy knowledge propagation.

Monadic actions

mrgMapM_ :: (MonadTryMerge m, Foldable t) => (a -> m b) -> t a -> m () Source #

mapM_ with MergingStrategy knowledge propagation.

mrgForM_ :: (MonadTryMerge m, Foldable t) => t a -> (a -> m b) -> m () Source #

forM_ with MergingStrategy knowledge propagation.

mrgSequence_ :: (Foldable t, MonadTryMerge m) => t (m a) -> m () Source #

sequence_ with MergingStrategy knowledge propagation.

mrgMsum :: (MonadTryMerge m, Mergeable a, MonadPlus m, Foldable t) => t (m a) -> m a Source #

msum with MergingStrategy knowledge propagation.

Folding actions

symAnd :: (EvalMode mode, Foldable t) => t (GetBool mode) -> GetBool mode Source #

and on unified boolean.

symOr :: (EvalMode mode, Foldable t) => t (GetBool mode) -> GetBool mode Source #

or on unified boolean.

symAny :: (EvalMode mode, Foldable t) => (a -> GetBool mode) -> t a -> GetBool mode Source #

any on unified boolean.

symAll :: (EvalMode mode, Foldable t) => (a -> GetBool mode) -> t a -> GetBool mode Source #

all on unified boolean.

symMaximumBy :: forall mode t a. (Foldable t, Mergeable a, UnifiedITEOp mode a, EvalMode mode) => (a -> a -> BaseMonad mode Ordering) -> t a -> a Source #

maximumBy with result merged with ITEOp.

mrgMaximumBy :: forall mode t a m. (Foldable t, Mergeable a, MonadWithMode mode m) => (a -> a -> BaseMonad mode Ordering) -> t a -> m a Source #

maximumBy with MergingStrategy knowledge propagation.

symMinimumBy :: forall mode t a. (Foldable t, Mergeable a, UnifiedITEOp mode a, EvalMode mode) => (a -> a -> BaseMonad mode Ordering) -> t a -> a Source #

minimumBy with result merged with ITEOp.

mrgMinimumBy :: forall mode t a m. (Foldable t, Mergeable a, MonadWithMode mode m) => (a -> a -> BaseMonad mode Ordering) -> t a -> m a Source #

minimumBy with MergingStrategy knowledge propagation.

Searches

symNotElem :: (Foldable t, UnifiedSymEq mode a, EvalMode mode) => a -> t a -> GetBool mode Source #

elem with symbolic equality.

mrgFind :: (Foldable t, MonadWithMode mode m, Mergeable a) => (a -> GetBool mode) -> t a -> m (Maybe a) Source #

elem with symbolic equality and MergingStrategy knowledge propagation.