@@ -1582,22 +1582,22 @@ submapBitmapIndexed comp !b1 !ary1 !b2 !ary2 = subsetBitmaps && go 0 0 (b1Orb2 .
15821582--
15831583-- >>> union (fromList [(1,'a'),(2,'b')]) (fromList [(2,'c'),(3,'d')])
15841584-- fromList [(1,'a'),(2,'b'),(3,'d')]
1585- union :: ( Eq k , Hashable k ) => HashMap k v -> HashMap k v -> HashMap k v
1585+ union :: Eq k => HashMap k v -> HashMap k v -> HashMap k v
15861586union = unionWith const
15871587{-# INLINABLE union #-}
15881588
15891589-- | \(O(n+m)\) The union of two maps. If a key occurs in both maps,
15901590-- the provided function (first argument) will be used to compute the
15911591-- result.
1592- unionWith :: ( Eq k , Hashable k ) => (v -> v -> v ) -> HashMap k v -> HashMap k v
1592+ unionWith :: Eq k => (v -> v -> v ) -> HashMap k v -> HashMap k v
15931593 -> HashMap k v
15941594unionWith f = unionWithKey (const f)
15951595{-# INLINE unionWith #-}
15961596
15971597-- | \(O(n+m)\) The union of two maps. If a key occurs in both maps,
15981598-- the provided function (first argument) will be used to compute the
15991599-- result.
1600- unionWithKey :: ( Eq k , Hashable k ) => (k -> v -> v -> v ) -> HashMap k v -> HashMap k v
1600+ unionWithKey :: Eq k => (k -> v -> v -> v ) -> HashMap k v -> HashMap k v
16011601 -> HashMap k v
16021602unionWithKey f = go 0
16031603 where
@@ -1718,7 +1718,7 @@ unionArrayBy f !b1 !b2 !ary1 !ary2 = A.run $ do
17181718-- TODO: Figure out the time complexity of 'unions'.
17191719
17201720-- | Construct a set containing all elements from a list of sets.
1721- unions :: ( Eq k , Hashable k ) => [HashMap k v ] -> HashMap k v
1721+ unions :: Eq k => [HashMap k v ] -> HashMap k v
17221722unions = List. foldl' union empty
17231723{-# INLINE unions #-}
17241724
@@ -1833,21 +1833,21 @@ differenceWith f a b = foldlWithKey' go empty a
18331833
18341834-- | \(O(n \log m)\) Intersection of two maps. Return elements of the first
18351835-- map for keys existing in the second.
1836- intersection :: ( Eq k , Hashable k ) => HashMap k v -> HashMap k w -> HashMap k v
1836+ intersection :: Eq k => HashMap k v -> HashMap k w -> HashMap k v
18371837intersection = Exts. inline intersectionWith const
18381838{-# INLINABLE intersection #-}
18391839
18401840-- | \(O(n \log m)\) Intersection of two maps. If a key occurs in both maps
18411841-- the provided function is used to combine the values from the two
18421842-- maps.
1843- intersectionWith :: ( Eq k , Hashable k ) => (v1 -> v2 -> v3 ) -> HashMap k v1 -> HashMap k v2 -> HashMap k v3
1843+ intersectionWith :: Eq k => (v1 -> v2 -> v3 ) -> HashMap k v1 -> HashMap k v2 -> HashMap k v3
18441844intersectionWith f = Exts. inline intersectionWithKey $ const f
18451845{-# INLINABLE intersectionWith #-}
18461846
18471847-- | \(O(n \log m)\) Intersection of two maps. If a key occurs in both maps
18481848-- the provided function is used to combine the values from the two
18491849-- maps.
1850- intersectionWithKey :: ( Eq k , Hashable k ) => (k -> v1 -> v2 -> v3 ) -> HashMap k v1 -> HashMap k v2 -> HashMap k v3
1850+ intersectionWithKey :: Eq k => (k -> v1 -> v2 -> v3 ) -> HashMap k v1 -> HashMap k v2 -> HashMap k v3
18511851intersectionWithKey f = intersectionWithKey# $ \ k v1 v2 -> (# f k v1 v2 # )
18521852{-# INLINABLE intersectionWithKey #-}
18531853
0 commit comments