Hoogle Search

Within LTS Haskell 24.36 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. isProperSubmapOfBy :: Ord k => (a -> b -> Bool) -> Map k a -> Map k b -> Bool

    containers Data.Map.Strict.Internal

    Is this a proper submap? (ie. a submap but not equal). The expression (isProperSubmapOfBy f m1 m2) returns True when keys m1 and keys m2 are not equal, all keys in m1 are in m2, and when f returns True when applied to their respective values. For example, the following expressions are all True:

    isProperSubmapOfBy (==) (fromList [(1,1)]) (fromList [(1,1),(2,2)])
    isProperSubmapOfBy (<=) (fromList [(1,1)]) (fromList [(1,1),(2,2)])
    
    But the following are all False:
    isProperSubmapOfBy (==) (fromList [(1,1),(2,2)]) (fromList [(1,1),(2,2)])
    isProperSubmapOfBy (==) (fromList [(1,1),(2,2)]) (fromList [(1,1)])
    isProperSubmapOfBy (<)  (fromList [(1,1)])       (fromList [(1,1),(2,2)])
    

  2. isSubmapOf :: (Ord k, Eq a) => Map k a -> Map k a -> Bool

    containers Data.Map.Strict.Internal

    This function is defined as (isSubmapOf = isSubmapOfBy (==)).

  3. isSubmapOfBy :: Ord k => (a -> b -> Bool) -> Map k a -> Map k b -> Bool

    containers 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.

  4. foldMapWithIndex :: Monoid m => (Int -> a -> m) -> Seq a -> m

    containers Data.Sequence

    No documentation available.

  5. foldMapWithIndex :: Monoid m => (Int -> a -> m) -> Seq a -> m

    containers Data.Sequence.Internal

    No documentation available.

  6. functionMap :: Function b => (a -> b) -> (b -> a) -> (a -> c) -> a :-> c

    QuickCheck 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.

  7. 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
    

  8. shrinkMapBy :: (a -> b) -> (b -> a) -> (a -> [a]) -> b -> [b]

    QuickCheck Test.QuickCheck

    Non-overloaded version of shrinkMap.

  9. suchThatMap :: Gen a -> (a -> Maybe b) -> Gen b

    QuickCheck Test.QuickCheck

    Generates a value for which the given function returns a Just, and then applies the function.

  10. 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
    

Page 409 of many | Previous | Next