git.iko.soy/typeable/refined-containers
on main help sign in
Haddock fixes
commitf2c3273bcb48bc213e735d715a4c256b91a6ac18 authormniip <mniip@mniip.com> dateMon 24 Mar 2025, 20:58 (2 years ago) parent94f82a7
4 files changed+9−6
unifiedsplit
src/Data/HashMap/Common/Refined.hs+3−3 src/Data/HashMap/Refined.hs+2−1 src/Data/IntMap/Refined.hs+2−1 src/Data/Map/Refined.hs+2−1
src/Data/HashMap/Common/Refined.hs+3−3
@@ -474,7 +474,7 @@ instance TraversableWithIndex (Key s k) (HashMap s k) where
474474 itraverse = traverseWithKey
475475
476476-- | Similar to the instance for functions -- zip corresponding keys. To use
477−-- '<*>'/'Control.Applicative.liftA2' without 'KnownSet' see 'zipWith'.
477+-- '<*>'/'Control.Applicative.liftA2' without 'KnownHashSet' see 'zipWith'.
478478instance (Hashable k, KnownHashSet s k) => Applicative (HashMap s k) where
479479 pure x = fromSet \_ -> x
480480 (<*>) = zipWith id
@@ -486,8 +486,8 @@ bind
486486 => HashMap s k a -> (a -> HashMap s k b) -> HashMap s k b
487487bind m f = mapWithKey (\k x -> f x ! k) m
488488
489−-- | Similar to the instance for functions. To use '>>=' without 'KnownSet' see
490−-- 'bind'.
489+-- | Similar to the instance for functions. To use '>>=' without 'KnownHashSet'
490+-- see 'bind'.
491491instance (Hashable k, KnownHashSet s k) => Monad (HashMap s k) where
492492 (>>=) = bind
493493
src/Data/HashMap/Refined.hs+2−1
@@ -344,7 +344,8 @@ updateLookupWithKey f k (HashMap m) =
344344 )
345345
346346-- | Given two maps proven to have the same keys, for each key apply the
347−-- function to the associated values, to obtain a new map with the same keys.
347+-- function to the associated values and the key, to obtain a new map with the
348+-- same keys.
348349zipWithKey
349350 :: forall s k a b c. Hashable k
350351 => (Key s k -> a -> b -> c) -> HashMap s k a -> HashMap s k b -> HashMap s k c
src/Data/IntMap/Refined.hs+2−1
@@ -337,7 +337,8 @@ updateLookupWithKey f k (IntMap m)
337337 $ SomeIntMapWith (IntMap m') $ SupersetProof unsafeSubset
338338
339339-- | Given two maps proven to have the same keys, for each key apply the
340−-- function to the associated values, to obtain a new map with the same keys.
340+-- function to the associated values and the key, to obtain a new map with the
341+-- same keys.
341342zipWithKey
342343 :: forall s a b c. (Key s -> a -> b -> c)
343344 -> IntMap s a
src/Data/Map/Refined.hs+2−1
@@ -348,7 +348,8 @@ updateLookupWithKey f k (Map m)
348348 $ SomeMapWith (Map m') $ SupersetProof unsafeSubset
349349
350350-- | Given two maps proven to have the same keys, for each key apply the
351−-- function to the associated values, to obtain a new map with the same keys.
351+-- function to the associated values and the key, to obtain a new map with the
352+-- same keys.
352353zipWithKey
353354 :: forall s k a b c. Ord k
354355 => (Key s k -> a -> b -> c) -> Map s k a -> Map s k b -> Map s k c