Skip to content

Commit

Permalink
Remove redundant constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
zliu41 committed Apr 30, 2019
1 parent 65fed01 commit 90b35ae
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog for multi-containers

## 0.1.0.2

- Remove redundant constraints

## 0.1.0.1

- Update README
Expand Down
4 changes: 2 additions & 2 deletions multi-containers.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
--
-- see: https://github.com/sol/hpack
--
-- hash: 9da8e5d6bcf046772035130681fc079404a33a3d4d63ac224b441b08ce7e0284
-- hash: 5c8d0a2541fa360ef1903f422222c873e84c5ea3b0fd709475a4ee54c843bbf8

name: multi-containers
version: 0.1.0.1
version: 0.1.0.2
synopsis: A few multimap variants.
description: A library that provides a few multimap variants.
category: Data Structures
Expand Down
2 changes: 1 addition & 1 deletion package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: multi-containers
version: 0.1.0.1
version: 0.1.0.2
github: "zliu41/multi-containers"
license: BSD3
author: "Ziyang Liu <free@cofree.io>"
Expand Down
4 changes: 2 additions & 2 deletions src/Data/Multimap/Set.hs
Original file line number Diff line number Diff line change
Expand Up @@ -266,15 +266,15 @@ deleteWithValue k a = alter (Set.delete a) k
--
-- > deleteMax 3 (fromList [(1,'a'),(1,'b'),(2,'c')]) === fromList [(1,'a'),(1,'b'),(2,'c')]
-- > deleteMax 1 (fromList [(1,'a'),(1,'b'),(2,'c')]) === fromList [(1,'a'),(2,'c')]
deleteMax :: (Ord k, Ord a) => k -> SetMultimap k a -> SetMultimap k a
deleteMax :: Ord k => k -> SetMultimap k a -> SetMultimap k a
deleteMax = alter Set.deleteMax

-- | /O(log m * log k)/. Remove the minimal value
-- associated with the key, if exists.
--
-- > deleteMin 3 (fromList [(1,'a'),(1,'b'),(2,'c')]) === fromList [(1,'a'),(1,'b'),(2,'c')]
-- > deleteMin 1 (fromList [(1,'a'),(1,'b'),(2,'c')]) === fromList [(1,'b'),(2,'c')]
deleteMin :: (Ord k, Ord a) => k -> SetMultimap k a -> SetMultimap k a
deleteMin :: Ord k => k -> SetMultimap k a -> SetMultimap k a
deleteMin = alter Set.deleteMin

-- | /O(m * log m * log k)/, assuming the function @a -> a@ takes /O(1)/.
Expand Down

0 comments on commit 90b35ae

Please sign in to comment.