Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion containers-tests/benchmarks/IntSet.hs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ main = do
, bench "map" $ whnf (IS.map (+ 1)) s
, bench "filter" $ whnf (IS.filter ((== 0) . (`mod` 2))) s
, bench "partition" $ whnf (IS.partition ((== 0) . (`mod` 2))) s
, bench "fold" $ whnf (IS.fold (:) []) s
, bench "delete" $ whnf (del elems) s
, bench "findMin" $ whnf IS.findMin s
, bench "findMax" $ whnf IS.findMax s
Expand Down
1 change: 0 additions & 1 deletion containers-tests/benchmarks/Set.hs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ main = do
, bench "map" $ whnf (S.map (+ 1)) s
, bench "filter" $ whnf (S.filter ((== 0) . (`mod` 2))) s
, bench "partition" $ whnf (S.partition ((== 0) . (`mod` 2))) s
, bench "fold" $ whnf (S.fold (:) []) s
, bench "delete" $ whnf (del elems) s
, bench "findMin" $ whnf S.findMin s
, bench "findMax" $ whnf S.findMax s
Expand Down
4 changes: 4 additions & 0 deletions containers/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
* Various deprecated functions, whose definitions currently cause type errors,
have been removed. (Soumik Sarkar)

* `Data.Set.fold` and `Data.IntSet.fold` have long been documented as
deprecated and are now marked as such. They will be removed in a future
release.

### Bug fixes

* Make the package compile with MicroHs. (Lennart Augustsson)
Expand Down
5 changes: 2 additions & 3 deletions containers/src/Data/IntSet/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1180,10 +1180,9 @@ mapMonotonic f = fromDistinctAscList . List.map f . toAscList
Fold
--------------------------------------------------------------------}
-- | \(O(n)\). Fold the elements in the set using the given right-associative
-- binary operator. This function is an equivalent of 'foldr' and is present
-- for compatibility only.
-- binary operator.
--
-- /Please note that fold will be deprecated in the future and removed./
{-# DEPRECATED fold "Use Data.IntSet.foldr instead" #-}
fold :: (Key -> b -> b) -> b -> IntSet -> b
fold = foldr
{-# INLINE fold #-}
Expand Down
5 changes: 2 additions & 3 deletions containers/src/Data/Set/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1027,10 +1027,9 @@ mapMonotonic f (Bin sz x l r) = Bin sz (f x) (mapMonotonic f l) (mapMonotonic f
Fold
--------------------------------------------------------------------}
-- | \(O(n)\). Fold the elements in the set using the given right-associative
-- binary operator. This function is an equivalent of 'foldr' and is present
-- for compatibility only.
-- binary operator.
--
-- /Please note that fold will be deprecated in the future and removed./
{-# DEPRECATED fold "Use Data.Set.foldr instead" #-}
fold :: (a -> b -> b) -> b -> Set a -> b
fold = foldr
{-# INLINE fold #-}
Expand Down