Copyright | (c) Sirui Lu 2021-2024 |
---|---|
License | BSD-3-Clause (see the LICENSE file) |
Maintainer | siruilu@cs.washington.edu |
Stability | Experimental |
Portability | GHC only |
Safe Haskell | Trustworthy |
Language | Haskell2010 |
Synopsis
- mrgFmap :: (TryMerge f, Mergeable a, Mergeable b, Functor f) => (a -> b) -> f a -> f b
- (.<$) :: (TryMerge f, Mergeable a, Mergeable b, Functor f) => b -> f a -> f b
- mrgReturnWithStrategy :: MonadTryMerge u => MergingStrategy a -> a -> u a
- mrgBindWithStrategy :: MonadTryMerge u => MergingStrategy a -> MergingStrategy b -> u a -> (a -> u b) -> u b
- mrgReturn :: (MonadTryMerge u, Mergeable a) => a -> u a
- (.>>=) :: (MonadTryMerge u, Mergeable a, Mergeable b) => u a -> (a -> u b) -> u b
- (.>>) :: (MonadTryMerge m, Mergeable a, Mergeable b) => m a -> m b -> m b
- mrgFail :: (MonadTryMerge m, Mergeable a, MonadFail m) => String -> m a
- mrgMzero :: forall m a. (MonadTryMerge m, Mergeable a, MonadPlus m) => m a
- mrgMplus :: forall m a. (MonadTryMerge m, Mergeable a, MonadPlus m) => m a -> m a -> m a
- mrgMapM :: forall a b t f. (Mergeable b, Mergeable1 t, MonadTryMerge f, Traversable t) => (a -> f b) -> t a -> f (t b)
- mrgMapM_ :: (MonadTryMerge m, Foldable t) => (a -> m b) -> t a -> m ()
- mrgForM :: (Mergeable b, Mergeable1 t, Traversable t, MonadTryMerge m) => t a -> (a -> m b) -> m (t b)
- mrgForM_ :: (MonadTryMerge m, Foldable t) => t a -> (a -> m b) -> m ()
- mrgSequence :: forall a t f. (Mergeable a, Mergeable1 t, MonadTryMerge f, Traversable t) => t (f a) -> f (t a)
- mrgSequence_ :: (Foldable t, MonadTryMerge m) => t (m a) -> m ()
- (.=<<) :: (MonadTryMerge m, Mergeable a, Mergeable b) => (a -> m b) -> m a -> m b
- (.>=>) :: (MonadTryMerge m, Mergeable a, Mergeable b, Mergeable c) => (a -> m b) -> (b -> m c) -> a -> m c
- (.<=<) :: (MonadTryMerge m, Mergeable a, Mergeable b, Mergeable c) => (b -> m c) -> (a -> m b) -> a -> m c
- mrgForever :: (Applicative m, TryMerge m, Mergeable b, Mergeable a) => m a -> m b
- mrgVoid :: (TryMerge f, Functor f) => f a -> f ()
- mrgJoin :: (MonadTryMerge m, Mergeable a) => m (m a) -> m a
- mrgMsum :: (MonadTryMerge m, Mergeable a, MonadPlus m, Foldable t) => t (m a) -> m a
- mrgMfilter :: (MonadTryMerge m, MonadPlus m, Mergeable a) => (a -> Bool) -> m a -> m a
- symMfilter :: forall mode m a. (MonadTryMerge m, MonadPlus m, UnifiedBranching mode m, Mergeable a) => (a -> GetBool mode) -> m a -> m a
- mrgFilterM :: (TryMerge m, Applicative m, Mergeable a, Foldable t) => (a -> m Bool) -> t a -> m [a]
- symFilterM :: forall mode m t a. (TryMerge m, UnifiedBranching mode m, MonadTryMerge m, EvalModeBase mode, Mergeable a, Foldable t) => (a -> m (GetBool mode)) -> t a -> m [a]
- mrgMapAndUnzipM :: (Applicative m, TryMerge m, Mergeable b, Mergeable c) => (a -> m (b, c)) -> [a] -> m ([b], [c])
- mrgZipWithM :: (Applicative m, TryMerge m, Mergeable c) => (a -> b -> m c) -> [a] -> [b] -> m [c]
- mrgZipWithM_ :: (Applicative m, TryMerge m, Mergeable c) => (a -> b -> m c) -> [a] -> [b] -> m ()
- mrgFoldM :: (MonadTryMerge m, Mergeable b, Foldable t) => (b -> a -> m b) -> b -> t a -> m b
- mrgFoldM_ :: (MonadTryMerge m, Foldable t, Mergeable b) => (b -> a -> m b) -> b -> t a -> m ()
- mrgReplicateM :: (Applicative m, TryMerge m, Mergeable a) => Int -> m a -> m [a]
- symReplicateM :: forall mode m a int. (EvalModeBase mode, TryMerge m, Applicative m, Mergeable a, Num int, UnifiedBranching mode m, UnifiedSymOrd mode Int, UnifiedSymOrd mode int) => Int -> int -> m a -> m [a]
- mrgReplicateM_ :: (Applicative m, TryMerge m, Mergeable a) => Int -> m a -> m ()
- symReplicateM_ :: forall mode m a int. (EvalModeBase mode, TryMerge m, Applicative m, Mergeable a, Num int, UnifiedBranching mode m, UnifiedSymOrd mode Int, UnifiedSymOrd mode int) => Int -> int -> m a -> m ()
- mrgGuard :: (Alternative m, TryMerge m) => Bool -> m ()
- symGuard :: (SymBranching m, TryMerge m, Alternative m) => SymBool -> m ()
- mrgWhen :: (Applicative m, TryMerge m) => Bool -> m () -> m ()
- symWhen :: (Applicative m, TryMerge m, SymBranching m) => SymBool -> m () -> m ()
- mrgUnless :: (Applicative m, TryMerge m) => Bool -> m () -> m ()
- symUnless :: (Applicative m, TryMerge m, SymBranching m) => SymBool -> m () -> m ()
- mrgLiftM :: (MonadTryMerge m, Mergeable a, Mergeable b) => (a -> b) -> m a -> m b
- mrgLiftM2 :: (MonadTryMerge m, Mergeable a, Mergeable b, Mergeable c) => (a -> b -> c) -> m a -> m b -> m c
- mrgLiftM3 :: (MonadTryMerge m, Mergeable a, Mergeable b, Mergeable c, Mergeable d) => (a -> b -> c -> d) -> m a -> m b -> m c -> m d
- mrgLiftM4 :: (MonadTryMerge m, Mergeable a, Mergeable b, Mergeable c, Mergeable d, Mergeable e) => (a -> b -> c -> d -> e) -> m a -> m b -> m c -> m d -> m e
- mrgLiftM5 :: (MonadTryMerge m, Mergeable a, Mergeable b, Mergeable c, Mergeable d, Mergeable e, Mergeable f) => (a -> b -> c -> d -> e -> f) -> m a -> m b -> m c -> m d -> m e -> m f
- mrgAp :: (MonadTryMerge m, Mergeable a, Mergeable b) => m (a -> b) -> m a -> m b
- (.<$!>) :: (MonadTryMerge m, Mergeable a, Mergeable b) => (a -> b) -> m a -> m b
Functor and Monad classes
mrgFmap :: (TryMerge f, Mergeable a, Mergeable b, Functor f) => (a -> b) -> f a -> f b Source #
fmap
with MergingStrategy
knowledge propagation.
(.<$) :: (TryMerge f, Mergeable a, Mergeable b, Functor f) => b -> f a -> f b infixl 4 Source #
<$
with MergingStrategy
knowledge propagation.
mrgReturnWithStrategy :: MonadTryMerge u => MergingStrategy a -> a -> u a Source #
return
with MergingStrategy
knowledge propagation.
mrgBindWithStrategy :: MonadTryMerge u => MergingStrategy a -> MergingStrategy b -> u a -> (a -> u b) -> u b Source #
>>=
with MergingStrategy
knowledge propagation.
mrgReturn :: (MonadTryMerge u, Mergeable a) => a -> u a Source #
return
with MergingStrategy
knowledge propagation.
(.>>=) :: (MonadTryMerge u, Mergeable a, Mergeable b) => u a -> (a -> u b) -> u b infixl 1 Source #
>>=
with MergingStrategy
knowledge propagation.
(.>>) :: (MonadTryMerge m, Mergeable a, Mergeable b) => m a -> m b -> m b infixl 1 Source #
>>
with MergingStrategy
knowledge propagation.
This is usually more efficient than calling the original >>
and merge the
results.
mrgFail :: (MonadTryMerge m, Mergeable a, MonadFail m) => String -> m a Source #
fail
with MergingStrategy
knowledge propagation.
mrgMzero :: forall m a. (MonadTryMerge m, Mergeable a, MonadPlus m) => m a Source #
mzero
with MergingStrategy
knowledge
propagation.
mrgMplus :: forall m a. (MonadTryMerge m, Mergeable a, MonadPlus m) => m a -> m a -> m a Source #
mplus
with MergingStrategy
knowledge
propagation.
Functions
Basic Monad
functions
mrgMapM :: forall a b t f. (Mergeable b, Mergeable1 t, MonadTryMerge f, Traversable t) => (a -> f b) -> t a -> f (t b) Source #
mapM
with MergingStrategy
knowledge
propagation.
mrgMapM_ :: (MonadTryMerge m, Foldable t) => (a -> m b) -> t a -> m () Source #
mapM_
with MergingStrategy
knowledge
propagation.
mrgForM :: (Mergeable b, Mergeable1 t, Traversable t, MonadTryMerge m) => t a -> (a -> m b) -> m (t b) Source #
forM
with MergingStrategy
knowledge
propagation.
mrgForM_ :: (MonadTryMerge m, Foldable t) => t a -> (a -> m b) -> m () Source #
forM_
with MergingStrategy
knowledge
propagation.
mrgSequence :: forall a t f. (Mergeable a, Mergeable1 t, MonadTryMerge f, Traversable t) => t (f a) -> f (t a) Source #
sequence
with MergingStrategy
knowledge
propagation.
mrgSequence_ :: (Foldable t, MonadTryMerge m) => t (m a) -> m () Source #
sequence_
with MergingStrategy
knowledge
propagation.
(.=<<) :: (MonadTryMerge m, Mergeable a, Mergeable b) => (a -> m b) -> m a -> m b infixr 1 Source #
=<<
with MergingStrategy
knowledge propagation.
(.>=>) :: (MonadTryMerge m, Mergeable a, Mergeable b, Mergeable c) => (a -> m b) -> (b -> m c) -> a -> m c infixr 1 Source #
>=>
with MergingStrategy
knowledge
propagation.
(.<=<) :: (MonadTryMerge m, Mergeable a, Mergeable b, Mergeable c) => (b -> m c) -> (a -> m b) -> a -> m c infixr 1 Source #
<=<
with MergingStrategy
knowledge
propagation.
mrgForever :: (Applicative m, TryMerge m, Mergeable b, Mergeable a) => m a -> m b Source #
forever
with MergingStrategy
knowledge
propagation.
mrgVoid :: (TryMerge f, Functor f) => f a -> f () Source #
void
with MergingStrategy
knowledge
propagation.
Generalisations of list functions
mrgJoin :: (MonadTryMerge m, Mergeable a) => m (m a) -> m a Source #
join
with MergingStrategy
knowledge
propagation.
mrgMsum :: (MonadTryMerge m, Mergeable a, MonadPlus m, Foldable t) => t (m a) -> m a Source #
msum
with MergingStrategy
knowledge
propagation.
mrgMfilter :: (MonadTryMerge m, MonadPlus m, Mergeable a) => (a -> Bool) -> m a -> m a Source #
mfilter
with MergingStrategy
knowledge
propagation.
symMfilter :: forall mode m a. (MonadTryMerge m, MonadPlus m, UnifiedBranching mode m, Mergeable a) => (a -> GetBool mode) -> m a -> m a Source #
mfilter
with MergingStrategy
knowledge
propagation and symbolic conditions.
mrgFilterM :: (TryMerge m, Applicative m, Mergeable a, Foldable t) => (a -> m Bool) -> t a -> m [a] Source #
filterM
with MergingStrategy
knowledge
propagation.
symFilterM :: forall mode m t a. (TryMerge m, UnifiedBranching mode m, MonadTryMerge m, EvalModeBase mode, Mergeable a, Foldable t) => (a -> m (GetBool mode)) -> t a -> m [a] Source #
filterM
with MergingStrategy
knowledge
propagation and symbolic conditions.
mrgMapAndUnzipM :: (Applicative m, TryMerge m, Mergeable b, Mergeable c) => (a -> m (b, c)) -> [a] -> m ([b], [c]) Source #
mapAndUnzipM
with MergingStrategy
knowledge
propagation.
mrgZipWithM :: (Applicative m, TryMerge m, Mergeable c) => (a -> b -> m c) -> [a] -> [b] -> m [c] Source #
zipWithM
with MergingStrategy
knowledge
propagation.
mrgZipWithM_ :: (Applicative m, TryMerge m, Mergeable c) => (a -> b -> m c) -> [a] -> [b] -> m () Source #
zipWithM_
with MergingStrategy
knowledge
propagation.
mrgFoldM :: (MonadTryMerge m, Mergeable b, Foldable t) => (b -> a -> m b) -> b -> t a -> m b Source #
foldM
with MergingStrategy
knowledge
propagation.
mrgFoldM_ :: (MonadTryMerge m, Foldable t, Mergeable b) => (b -> a -> m b) -> b -> t a -> m () Source #
foldM_
with MergingStrategy
knowledge
propagation.
mrgReplicateM :: (Applicative m, TryMerge m, Mergeable a) => Int -> m a -> m [a] Source #
replicateM
with MergingStrategy
knowledge
propagation.
symReplicateM :: forall mode m a int. (EvalModeBase mode, TryMerge m, Applicative m, Mergeable a, Num int, UnifiedBranching mode m, UnifiedSymOrd mode Int, UnifiedSymOrd mode int) => Int -> int -> m a -> m [a] Source #
replicateM
with MergingStrategy
knowledge
propagation and symbolic number of elements.
mrgReplicateM_ :: (Applicative m, TryMerge m, Mergeable a) => Int -> m a -> m () Source #
replicateM_
with MergingStrategy
knowledge
propagation.
symReplicateM_ :: forall mode m a int. (EvalModeBase mode, TryMerge m, Applicative m, Mergeable a, Num int, UnifiedBranching mode m, UnifiedSymOrd mode Int, UnifiedSymOrd mode int) => Int -> int -> m a -> m () Source #
replicateM_
with MergingStrategy
knowledge
propagation and symbolic number of elements.
Conditional execution of monadic expressions
mrgGuard :: (Alternative m, TryMerge m) => Bool -> m () Source #
guard
with MergingStrategy
knowledge
propagation.
symGuard :: (SymBranching m, TryMerge m, Alternative m) => SymBool -> m () Source #
guard
with MergingStrategy
knowledge
propagation and symbolic conditions.
mrgWhen :: (Applicative m, TryMerge m) => Bool -> m () -> m () Source #
when
with MergingStrategy
knowledge
propagation.
symWhen :: (Applicative m, TryMerge m, SymBranching m) => SymBool -> m () -> m () Source #
when
with MergingStrategy
knowledge
propagation and symbolic conditions.
mrgUnless :: (Applicative m, TryMerge m) => Bool -> m () -> m () Source #
unless
with MergingStrategy
knowledge
propagation.
symUnless :: (Applicative m, TryMerge m, SymBranching m) => SymBool -> m () -> m () Source #
unless
with MergingStrategy
knowledge
propagation and symbolic conditions.
Monadic lifting operators
mrgLiftM :: (MonadTryMerge m, Mergeable a, Mergeable b) => (a -> b) -> m a -> m b Source #
liftM
with MergingStrategy
knowledge
propagation.
mrgLiftM2 :: (MonadTryMerge m, Mergeable a, Mergeable b, Mergeable c) => (a -> b -> c) -> m a -> m b -> m c Source #
liftM2
with MergingStrategy
knowledge
propagation.
mrgLiftM3 :: (MonadTryMerge m, Mergeable a, Mergeable b, Mergeable c, Mergeable d) => (a -> b -> c -> d) -> m a -> m b -> m c -> m d Source #
liftM3
with MergingStrategy
knowledge
propagation.
mrgLiftM4 :: (MonadTryMerge m, Mergeable a, Mergeable b, Mergeable c, Mergeable d, Mergeable e) => (a -> b -> c -> d -> e) -> m a -> m b -> m c -> m d -> m e Source #
liftM4
with MergingStrategy
knowledge
propagation.
mrgLiftM5 :: (MonadTryMerge m, Mergeable a, Mergeable b, Mergeable c, Mergeable d, Mergeable e, Mergeable f) => (a -> b -> c -> d -> e -> f) -> m a -> m b -> m c -> m d -> m e -> m f Source #
liftM5
with MergingStrategy
knowledge
propagation.
mrgAp :: (MonadTryMerge m, Mergeable a, Mergeable b) => m (a -> b) -> m a -> m b Source #
<*>
with MergingStrategy
knowledge
propagation.
Strict monadic functions
(.<$!>) :: (MonadTryMerge m, Mergeable a, Mergeable b) => (a -> b) -> m a -> m b infixl 4 Source #
<$!>
with MergingStrategy
knowledge
propagation. Merging is always strict so we can directly use
.<$>
.