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.

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

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

    containers Data.Sequence

    No documentation available.

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

    containers Data.Sequence.Internal

    No documentation available.

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

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

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

    QuickCheck Test.QuickCheck

    Non-overloaded version of shrinkMap.

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

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

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

    QuickCheck Test.QuickCheck.Arbitrary

    Non-overloaded version of shrinkMap.

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

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

Page 409 of many | Previous | Next