Skip to content

Commit 8df6d0e

Browse files
oberblastmeistersjakobi
authored andcommitted
remove redundant constraints
1 parent 9b06248 commit 8df6d0e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Data/HashMap/Internal.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1260,7 +1260,7 @@ adjust# f k0 m0 = go h0 k0 0 m0
12601260
-- | \(O(\log n)\) The expression @('update' f k map)@ updates the value @x@ at @k@
12611261
-- (if it is in the map). If @(f x)@ is 'Nothing', the element is deleted.
12621262
-- If it is @('Just' y)@, the key @k@ is bound to the new value @y@.
1263-
update :: (Eq k, Hashable k, Show k, Show a) => (a -> Maybe a) -> k -> HashMap k a -> HashMap k a
1263+
update :: (Eq k, Hashable k) => (a -> Maybe a) -> k -> HashMap k a -> HashMap k a
12641264
update f = Exts.inline alter (>>= f)
12651265
{-# INLINABLE update #-}
12661266

@@ -1272,11 +1272,11 @@ update f = Exts.inline alter (>>= f)
12721272
-- @
12731273
-- 'lookup' k ('alter' f k m) = f ('lookup' k m)
12741274
-- @
1275-
alter :: (Eq k, Hashable k, Show k, Show v) => (Maybe v -> Maybe v) -> k -> HashMap k v -> HashMap k v
1275+
alter :: (Eq k, Hashable k) => (Maybe v -> Maybe v) -> k -> HashMap k v -> HashMap k v
12761276
alter f k = alter' f (hash k) k
12771277
{-# INLINEABLE alter #-}
12781278

1279-
alter' :: (Eq k, Show v) => (Maybe v -> Maybe v) -> Hash -> k -> HashMap k v -> HashMap k v
1279+
alter' :: Eq k => (Maybe v -> Maybe v) -> Hash -> k -> HashMap k v -> HashMap k v
12801280
alter' f h0 k0 m0 = go h0 k0 0 m0
12811281
where
12821282
go !h !k !_ Empty = case f Nothing of

0 commit comments

Comments
 (0)