Hoogle Search
Within LTS Haskell 24.45 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
foldMapWithKey' :: Monoid r => (k -> v -> r) -> MonoidMap k v -> rmonoidmap-internal Data.MonoidMap.Internal A strict version of foldMapWithKey. Each application of mappend is evaluated before using the result in the next application.
fromMap :: MonoidNull v => Map k v -> MonoidMap k vmonoidmap-internal Data.MonoidMap.Internal Constructs a MonoidMap from an ordinary Map. Satisfies the following property for all possible keys k:
get k (fromMap m) == Map.findWithDefault mempty k m
This function performs canonicalisation of null values, and has a time complexity that is linear in the size of the map.fromMapWith :: MonoidNull v2 => (v1 -> v2) -> Map k v1 -> MonoidMap k v2monoidmap-internal Data.MonoidMap.Internal Constructs a MonoidMap from an ordinary Map, applying the given function to all values. Satisfies the following property for all possible keys k:
get k (fromMapWith f m) == maybe mempty f (Map.lookup k m)
This function performs canonicalisation of null values, and has a time complexity that is linear in the size of the map.isSubmapOf :: (Ord k, Monoid v, Reductive v) => MonoidMap k v -> MonoidMap k v -> Boolmonoidmap-internal Data.MonoidMap.Internal Indicates whether or not the first map is a submap of the second. Map m1 is a submap of map m2 if (and only if) m1 can be subtracted from m2 with the minusMaybe operation:
m1 `isSubmapOf` m2 == isJust (m2 `minusMaybe` m1)
Equivalently, map m1 is a submap of map m2 if (and only if) for all possible keys k, the value for k in m1 can be subtracted from the value for k in m2 with the (</>) operator:m1 `isSubmapOf` m2 == (∀ k. isJust (get k m2 </> get k m1))
-
monoidmap-internal Data.MonoidMap.Internal Indicates whether or not the first map is a submap of the second, using the given function to compare values for matching keys. Satisfies the following property:
isSubmapOfBy f m1 m2 == all (\k -> f (get k m1) (get k m2)) (nonNullKeys m1)
Conditional totality
If the given comparison function f always evaluates to True when its first argument is mempty:∀ v. f mempty v
Then the following property holds:isSubmapOfBy f m1 m2 == (∀ k. f (get k m1) (get k m2))
toMap :: MonoidMap k v -> Map k vmonoidmap-internal Data.MonoidMap.Internal Converts a MonoidMap to an ordinary Map. The result only includes entries with values that are not null. Satisfies the following round-trip property:
fromMap (toMap m) == m
module Data.MonoidMap.Internal.
RecoveredMap An ordinary left-biased map similar to Map, implemented in terms of MonoidMap.
unsafeFromMap :: Map k v -> MonoidMap k vmonoidmap-internal Data.MonoidMap.Internal.Unsafe Unsafely constructs a MonoidMap from an ordinary Map. Constructs a MonoidMap in constant time, without imposing the burden of a canonicalisation step to remove null values. When applied to a given Map m, this function expects but does not check the following pre-condition:
all (not . null) m
Not satisfying this pre-condition will result in undefined behaviour. See fromMap for a safe version of this function.-
morpheus-graphql-subscriptions Data.Morpheus.Subscriptions.Internal No documentation available.
concatMap :: (Key -> [Key]) -> IntMultiSet -> IntMultiSetmultiset Data.IntMultiSet O(n). Apply a function to each element, and take the union of the results