Hoogle Search
Within LTS Haskell 24.34 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
isSubmapOfBy :: Ord k => (a -> b -> Bool) -> Map k a -> Map k b -> Boolcontainers Data.Map.Strict.Internal The expression (isSubmapOfBy f t1 t2) returns True if all keys in t1 are in tree t2, and when f returns True when applied to their respective values. For example, the following expressions are all True:
isSubmapOfBy (==) (fromList [('a',1)]) (fromList [('a',1),('b',2)]) isSubmapOfBy (<=) (fromList [('a',1)]) (fromList [('a',1),('b',2)]) isSubmapOfBy (==) (fromList [('a',1),('b',2)]) (fromList [('a',1),('b',2)])But the following are all False:isSubmapOfBy (==) (fromList [('a',2)]) (fromList [('a',1),('b',2)]) isSubmapOfBy (<) (fromList [('a',1)]) (fromList [('a',1),('b',2)]) isSubmapOfBy (==) (fromList [('a',1),('b',2)]) (fromList [('a',1)])Note that isSubmapOfBy (_ _ -> True) m1 m2 tests whether all the keys in m1 are also keys in m2.foldMapWithIndex :: Monoid m => (Int -> a -> m) -> Seq a -> mcontainers Data.Sequence No documentation available.
foldMapWithIndex :: Monoid m => (Int -> a -> m) -> Seq a -> mcontainers Data.Sequence.Internal No documentation available.
functionMap :: Function b => (a -> b) -> (b -> a) -> (a -> c) -> a :-> cQuickCheck Test.QuickCheck The basic building block for Function instances. Provides a Function instance by mapping to and from a type that already has a Function instance.
shrinkMap :: Arbitrary a => (a -> b) -> (b -> a) -> b -> [b]QuickCheck Test.QuickCheck Map a shrink function to another domain. This is handy if your data type has special invariants, but is almost isomorphic to some other type.
shrinkOrderedList :: (Ord a, Arbitrary a) => [a] -> [[a]] shrinkOrderedList = shrinkMap sort id shrinkSet :: (Ord a, Arbitrary a) => Set a -> [Set a] shrinkSet = shrinkMap fromList toList
shrinkMapBy :: (a -> b) -> (b -> a) -> (a -> [a]) -> b -> [b]QuickCheck Test.QuickCheck Non-overloaded version of shrinkMap.
suchThatMap :: Gen a -> (a -> Maybe b) -> Gen bQuickCheck Test.QuickCheck Generates a value for which the given function returns a Just, and then applies the function.
shrinkMap :: Arbitrary a => (a -> b) -> (b -> a) -> b -> [b]QuickCheck Test.QuickCheck.Arbitrary Map a shrink function to another domain. This is handy if your data type has special invariants, but is almost isomorphic to some other type.
shrinkOrderedList :: (Ord a, Arbitrary a) => [a] -> [[a]] shrinkOrderedList = shrinkMap sort id shrinkSet :: (Ord a, Arbitrary a) => Set a -> [Set a] shrinkSet = shrinkMap fromList toList
shrinkMapBy :: (a -> b) -> (b -> a) -> (a -> [a]) -> b -> [b]QuickCheck Test.QuickCheck.Arbitrary Non-overloaded version of shrinkMap.
functionMap :: Function b => (a -> b) -> (b -> a) -> (a -> c) -> a :-> cQuickCheck Test.QuickCheck.Function The basic building block for Function instances. Provides a Function instance by mapping to and from a type that already has a Function instance.