Skip to content

Commit 801b06e

Browse files
authored
Prepare for 0.8 (#1116)
* Bump version to 0.8 * Update changelog and since annotations * Update cabal.project to allow CI to work
1 parent 1dbe342 commit 801b06e

File tree

12 files changed

+200
-75
lines changed

12 files changed

+200
-75
lines changed

.github/workflows/haskell-ci.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
#
99
# For more information, see https://github.com/haskell-CI/haskell-ci
1010
#
11-
# version: 0.19.20241219
11+
# version: 0.19.20250216
1212
#
13-
# REGENDATA ("0.19.20241219",["github","--config=cabal.haskell-ci","--ghc-head","cabal.project"])
13+
# REGENDATA ("0.19.20250216",["github","--config=cabal.haskell-ci","--ghc-head","cabal.project"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -23,7 +23,7 @@ on:
2323
jobs:
2424
linux:
2525
name: Haskell-CI - Linux - ${{ matrix.compiler }}
26-
runs-on: ubuntu-20.04
26+
runs-on: ubuntu-24.04
2727
timeout-minutes:
2828
60
2929
container:
@@ -103,11 +103,10 @@ jobs:
103103
mkdir -p "$HOME/.ghcup/bin"
104104
curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
105105
chmod a+x "$HOME/.ghcup/bin/ghcup"
106-
- name: Install cabal-install (prerelease)
106+
- name: Install cabal-install
107107
run: |
108-
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml;
109-
"$HOME/.ghcup/bin/ghcup" install cabal 3.15.0.0.2024.10.3 || (cat "$HOME"/.ghcup/logs/*.* && false)
110-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.15.0.0.2024.10.3 -vnormal+nowrap" >> "$GITHUB_ENV"
108+
"$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
109+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
111110
- name: Install GHC (GHCup)
112111
if: matrix.setup-method == 'ghcup'
113112
run: |
@@ -132,7 +131,7 @@ jobs:
132131
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
133132
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
134133
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
135-
if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then echo "HEADHACKAGE=true" >> "$GITHUB_ENV" ; else echo "HEADHACKAGE=false" >> "$GITHUB_ENV" ; fi
134+
if [ $((HCNUMVER > 91201)) -ne 0 ] ; then echo "HEADHACKAGE=true" >> "$GITHUB_ENV" ; else echo "HEADHACKAGE=false" >> "$GITHUB_ENV" ; fi
136135
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
137136
env:
138137
HCKIND: ${{ matrix.compilerKind }}
@@ -228,6 +227,7 @@ jobs:
228227
echo "package containers-tests" >> cabal.project
229228
echo " ghc-options: -Werror=missing-methods" >> cabal.project
230229
cat >> cabal.project <<EOF
230+
allow-newer: all:containers
231231
EOF
232232
if $HEADHACKAGE; then
233233
echo "allow-newer: $($HCPKG list --simple-output | sed -E 's/([a-zA-Z-]+)-[0-9.]+/*:\1,/g')" >> cabal.project

cabal.project

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
packages:
22
containers/
33
containers-tests/
4+
-- Tip: Remove containers from the above list when making changes locally.
5+
-- This avoids recompiling some dependencies (that depend on containers) when
6+
-- you test or benchmark your changes.
47

58
tests: True
69
benchmarks: True
710

8-
-- package containers-tests
9-
-- ghc-options: -Werror
11+
-- Disregard bounds on containers for all packages.
12+
-- This allows test dependencies to build (and hopefully work) on CI, even if
13+
-- the latest containers version is not yet marked as supported in their bounds.
14+
allow-newer: all:containers

containers/changelog.md

+149-31
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,212 @@
11
# Changelog for [`containers` package](http://github.com/haskell/containers)
22

3-
## Next release
3+
## 0.8 *March 2025*
44

55
### Breaking changes
66

77
* `Data.IntMap.Lazy.split`, `Data.IntMap.Strict.split`,
88
`Data.IntMap.Lazy.splitLookup`, `Data.IntMap.Strict.splitLookup` and
99
`Data.IntSet.splitMember` are now strict in the key. Previously, the key was
1010
ignored for an empty map or set. (Soumik Sarkar)
11+
([#982](https://github.com/haskell/containers/pull/982),
12+
[#983](https://github.com/haskell/containers/pull/983))
1113

12-
* The following functions have been updated to match the strictness of their
14+
* These functions have been updated to match the strictness of their
1315
`fromList` counterparts:
1416

15-
* `Data.Map.Strict.fromAscList`
16-
* `Data.Map.Strict.fromAscListWith`
17-
* `Data.Map.Strict.fromAscListWithKey`
18-
* `Data.Map.Strict.fromDescList`
19-
* `Data.Map.Strict.fromDescListWith`
20-
* `Data.Map.Strict.fromDescListWithKey`
21-
* `Data.IntMap.Strict.fromAscList`
22-
* `Data.IntMap.Strict.fromAscListWith`
23-
* `Data.IntMap.Strict.fromAscListWithKey`
17+
* `Data.Map.Strict`: `fromAscList`, `fromAscListWith`, `fromAscListWithKey`
18+
`fromDescList`, `fromDescListWith`, `fromDescListWithKey`
19+
* `Data.IntMap.Strict`: `fromAscList`, `fromAscListWith`, `fromAscListWithKey`
2420

2521
Previously they were lazier and did not force the first value in runs of at
2622
least 2 entries with equal keys. (Soumik Sarkar)
23+
([#1023](https://github.com/haskell/containers/pull/1023))
2724

28-
* Various deprecated functions, whose definitions currently cause type errors,
29-
have been removed. (Soumik Sarkar)
25+
* `Data.Set.fold` and `Data.IntSet.fold` are deprecated. One should instead use
26+
`Data.Set.foldr` and `Data.IntSet.foldr`. (Soumik Sarkar)
27+
([#1049](https://github.com/haskell/containers/pull/1049))
28+
29+
* For `Data.IntMap.{Lazy,Strict}`, `updateMin`, `updateMax`, `updateMinWithKey`,
30+
`updateMaxWithKey` now return an empty map for an input empty map instead of
31+
calling `error`. This matches the behavior of `Data.Map`. (Kushagra Gupta)
32+
([#1065](https://github.com/haskell/containers/pull/1065))
3033

31-
* `Data.Set.fold` and `Data.IntSet.fold` have long been documented as
32-
deprecated and are now marked as such. They will be removed in a future
33-
release.
34+
* `foldl'` and `foldr'` for `Seq` are now strict in the initial value. This
35+
matches the behavior of the default implementations and of other structures in
36+
the library. (Soumik Sarkar)
37+
([#1077](https://github.com/haskell/containers/pull/1077))
38+
39+
* Some long deprecated functions, whose definitions currently cause type errors,
40+
have been removed. (Soumik Sarkar)
41+
([#1046](https://github.com/haskell/containers/pull/1046))
3442

3543
### Bug fixes
3644

37-
* Make the package compile with MicroHs. (Lennart Augustsson)
45+
* Make the package compile with [MicroHs](https://github.com/augustss/MicroHs).
46+
(Lennart Augustsson)
47+
([#1043](https://github.com/haskell/containers/pull/1043),
48+
[#1081](https://github.com/haskell/containers/pull/1081))
49+
50+
* Fix a strictness bug in `Data.Map.Strict.fromDistinctAscList` and
51+
`Data.Map.Strict.fromDistinctDescList` where all values were not forced to
52+
WHNF. This bug affects versions 0.6.8 and 0.7. (Neil Mayhew)
53+
([#996](https://github.com/haskell/containers/pull/996))
54+
55+
* Fix a bug in `Data.IntMap`'s `isProperSubmapOfBy` where it could incorrectly
56+
return `False`. (Soumik Sarkar)
57+
([#1008](https://github.com/haskell/containers/pull/1008))
58+
59+
* Make `Data.Map.Merge.{Lazy,Strict}.filterAMissing` sequence effects in the
60+
correct order. (j6carey)
61+
([#1005](https://github.com/haskell/containers/pull/1005))
3862

3963
* `Data.Map.Strict.mergeWithKey` now forces the result of the combining function
4064
to WHNF. (Soumik Sarkar)
65+
([#1024](https://github.com/haskell/containers/pull/1024))
4166

4267
* Fix an issue where `Data.Map.mergeWithKey`, `Data.Map.Strict.mergeWithKey`,
4368
`Data.IntMap.mergeWithKey`, `Data.IntMap.Strict.mergeWithKey` could call the
4469
provided `only2` function with empty maps, contrary to documentation.
45-
(Soumik Sarkar)
70+
(Soumik Sarkar) ([#1025](https://github.com/haskell/containers/pull/1025))
4671

4772
### Additions
4873

74+
* Add `Data.Graph.flattenSCC1`. (Andreas Abel)
75+
([#987](https://github.com/haskell/containers/pull/987))
76+
77+
* Add `symmetricDifference` for `Set`, `Map`, `IntSet`, `IntMap`.
78+
(Soumik Sarkar) ([#1009](https://github.com/haskell/containers/pull/1009))
79+
4980
* Add `lookupMin` and `lookupMax` for `Data.IntSet`. (Soumik Sarkar)
81+
([#976](https://github.com/haskell/containers/pull/976))
5082

5183
* Add `Intersection` and `intersections` for `Data.Set` and `Data.IntSet`.
5284
(Reed Mullanix, Soumik Sarkar)
85+
([#756](https://github.com/haskell/containers/pull/756),
86+
[#1040](https://github.com/haskell/containers/pull/1040),
87+
[#1052](https://github.com/haskell/containers/pull/1052),
88+
[#1080](https://github.com/haskell/containers/pull/1080))
5389

5490
* Add `foldMap` for `Data.IntSet`. (Soumik Sarkar)
91+
([#1048](https://github.com/haskell/containers/pull/1048))
92+
93+
* Add `filterKeys` for `Data.Map` and `Data.IntMap`. (flip111)
94+
([#972](https://github.com/haskell/containers/pull/972))
95+
96+
* `NFData1`, `NFData2` instances for `SCC`, `IntMap`, `Map`, `Sequence`, `Set`,
97+
`Tree` and relevant internal dependencies (David Beacham)
98+
([#992](https://github.com/haskell/containers/pull/992))
5599

56100
* Add `leaves`, `edges`, `pathsToRoot`, `pathsFromRoot`, `PostOrder` to
57101
`Data.Tree`. (Soumik Sarkar)
102+
([#1109](https://github.com/haskell/containers/pull/1109))
58103

59104
### Performance improvements
60105

106+
* The internal representations of `IntMap` and `IntSet` have been changed
107+
to be a little more memory efficient. Consequently, many functions on
108+
`IntMap`s and `IntSet`s are a little faster now. (Soumik Sarkar)
109+
([#995](https://github.com/haskell/containers/pull/995),
110+
[#998](https://github.com/haskell/containers/pull/998))
111+
112+
* Improved performance for `Data.Map`'s `minView`, `maxView`, `difference`.
113+
(Soumik Sarkar) ([#1001](https://github.com/haskell/containers/pull/1001))
114+
61115
* For `Data.Graph.SCC`, `Foldable.toList` and `Foldable1.toNonEmpty` now
62-
do not perform a copy. (Soumik Sarkar)
116+
do not perform an unnecessary copy. (Soumik Sarkar)
117+
([#1057](https://github.com/haskell/containers/pull/1057))
63118

64119
* Improved performance for `Data.Intset`'s `foldr`, `foldl'`, `foldl`, `foldr'`.
120+
(Soumik Sarkar) ([#1079](https://github.com/haskell/containers/pull/1079))
65121

66122
* Improved performance for `Data.Set` and `Data.Map`'s `fromAscList*` and
67-
`fromDescList*` functions.
123+
`fromDescList*` functions. (Soumik Sarkar)
124+
([#1083](https://github.com/haskell/containers/pull/1083))
68125

69126
* Improved performance for `Data.Set`'s `fromList`, `map` and `Data.Map`'s
70127
`fromList`, `fromListWith`, `fromListWithKey`, `mapKeys`, `mapKeysWith`.
128+
(Soumik Sarkar) ([#1042](https://github.com/haskell/containers/pull/1042))
71129

72130
* Improved performance for many `Set` and `Map` modification operations,
73131
including `insert` and `delete`, by inlining part of the balancing
74132
routine. (Soumik Sarkar)
133+
([#1056](https://github.com/haskell/containers/pull/1056))
75134

76-
* Improved performance for `IntSet` and `IntMap`'s `Ord` instances.
135+
* Improved performance for `Eq` and `Ord` instances of `Set`, `Map`, `IntSet`,
136+
`IntMap`, `Seq`. (Soumik Sarkar)
137+
([#1028](https://github.com/haskell/containers/pull/1028),
138+
[#1017](https://github.com/haskell/containers/pull/1017),
139+
[#1035](https://github.com/haskell/containers/pull/1035),
140+
[#1086](https://github.com/haskell/containers/pull/1086),
141+
[#1112](https://github.com/haskell/containers/pull/1112))
142+
143+
### Documentation
144+
145+
* Add and improve documentation (Bodigrim, konsumlamm, Toni Dietze, alexfmpe,
146+
Soumik Sarkar, Jonathan Knowles, Xavier Góngora, Xia Li-yao, eyelash)
147+
([#957](https://github.com/haskell/containers/pull/957),
148+
[#1006](https://github.com/haskell/containers/pull/1006),
149+
[#877](https://github.com/haskell/containers/pull/877),
150+
[#960](https://github.com/haskell/containers/pull/960),
151+
[#1033](https://github.com/haskell/containers/pull/1033),
152+
[#1041](https://github.com/haskell/containers/pull/1041),
153+
[#1039](https://github.com/haskell/containers/pull/1039),
154+
[#1050](https://github.com/haskell/containers/pull/1050),
155+
[#1088](https://github.com/haskell/containers/pull/1088),
156+
[#1087](https://github.com/haskell/containers/pull/1087),
157+
[#1098](https://github.com/haskell/containers/pull/1098),
158+
[#1106](https://github.com/haskell/containers/pull/1106),
159+
[#1104](https://github.com/haskell/containers/pull/1104),
160+
[#1105](https://github.com/haskell/containers/pull/1105),
161+
[#1111](https://github.com/haskell/containers/pull/1111),
162+
[#1110](https://github.com/haskell/containers/pull/1110),
163+
[#1114](https://github.com/haskell/containers/pull/1114),
164+
[#1115](https://github.com/haskell/containers/pull/1115))
77165

78166
### Miscellaneous/internal
79167

80168
* Internal modules `Utils.Containers.Internal.BitUtil`,
81169
`Utils.Containers.Internal.BitQueue`, `Utils.Containers.Internal.StrictPair`
82-
are no longer exposed.
83-
84-
## Unreleased with `@since` annotation for 0.7.1:
85-
86-
### Additions
87-
88-
* Add `Data.Graph.flattenSCC1`. (Andreas Abel)
89-
90-
* `NFData1`, `NFData2` instances for `SCC`, `IntMap`, `Map`, `Sequence`, `Set`,
91-
`Tree` and relevant internal dependencies (David Beacham)
170+
are no longer exposed. (Soumik Sarkar)
171+
([#1101](https://github.com/haskell/containers/pull/1101))
172+
173+
* Test and CI maintenance. (Andreas Abel, Soumik Sarkar)
174+
([#986](https://github.com/haskell/containers/pull/986),
175+
[#1015](https://github.com/haskell/containers/pull/1015),
176+
[#1030](https://github.com/haskell/containers/pull/1030),
177+
[#1055](https://github.com/haskell/containers/pull/1055),
178+
[#1067](https://github.com/haskell/containers/pull/1067))
179+
180+
* Internal cleanups and improvements. (Soumik Sarkar, alexfmpe)
181+
([#1000](https://github.com/haskell/containers/pull/1000),
182+
[#959](https://github.com/haskell/containers/pull/959),
183+
[#1020](https://github.com/haskell/containers/pull/1020),
184+
[#1029](https://github.com/haskell/containers/pull/1029),
185+
[#1031](https://github.com/haskell/containers/pull/1031),
186+
[#1037](https://github.com/haskell/containers/pull/1037),
187+
[#1058](https://github.com/haskell/containers/pull/1058),
188+
[#1076](https://github.com/haskell/containers/pull/1076),
189+
[#1084](https://github.com/haskell/containers/pull/1084),
190+
[#1085](https://github.com/haskell/containers/pull/1085),
191+
[#1093](https://github.com/haskell/containers/pull/1093),
192+
[#1094](https://github.com/haskell/containers/pull/1094),
193+
[#1095](https://github.com/haskell/containers/pull/1095),
194+
[#1097](https://github.com/haskell/containers/pull/1097),
195+
[#1103](https://github.com/haskell/containers/pull/1103),
196+
[#1117](https://github.com/haskell/containers/pull/1117))
197+
198+
* Add new tests and benchmarks (Soumik Sarkar)
199+
([#962](https://github.com/haskell/containers/pull/962),
200+
[#1021](https://github.com/haskell/containers/pull/1021),
201+
[#1063](https://github.com/haskell/containers/pull/1063),
202+
[#1068](https://github.com/haskell/containers/pull/1068),
203+
[#1071](https://github.com/haskell/containers/pull/1071),
204+
[#1075](https://github.com/haskell/containers/pull/1075),
205+
[#1082](https://github.com/haskell/containers/pull/1082))
206+
207+
* Fix the Read the Docs tutorial (Soumik Sarkar)
208+
([#1091](https://github.com/haskell/containers/pull/1091),
209+
[#1099](https://github.com/haskell/containers/pull/1099))
92210

93211
## 0.7
94212

containers/containers.cabal

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cabal-version: 2.2
22
name: containers
3-
version: 0.7
3+
version: 0.8
44
license: BSD-3-Clause
55
license-file: LICENSE
66
maintainer: libraries@haskell.org

containers/src/Data/Graph.hs

+4-4
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ data SCC vertex
164164
| NECyclicSCC {-# UNPACK #-} !(NonEmpty vertex)
165165
-- ^ A maximal set of mutually reachable vertices.
166166
--
167-
-- @since 0.7.0
167+
-- @since 0.7
168168
deriving ( Eq -- ^ @since 0.5.9
169169
, Show -- ^ @since 0.5.9
170170
, Read -- ^ @since 0.5.9
@@ -228,7 +228,7 @@ instance F.Foldable SCC where
228228
toList = flattenSCC
229229

230230
#if MIN_VERSION_base(4,18,0)
231-
-- | @since 0.7.0
231+
-- | @since 0.7
232232
instance F1.Foldable1 SCC where
233233
foldMap1 f (AcyclicSCC v) = f v
234234
foldMap1 f (NECyclicSCC vs) = F1.foldMap1 f vs
@@ -250,7 +250,7 @@ instance NFData a => NFData (SCC a) where
250250
rnf (AcyclicSCC v) = rnf v
251251
rnf (NECyclicSCC vs) = rnf vs
252252

253-
-- | @since 0.7.1
253+
-- | @since 0.8
254254
instance NFData1 SCC where
255255
liftRnf rnfx (AcyclicSCC v) = rnfx v
256256
liftRnf rnfx (NECyclicSCC vs) = liftRnf rnfx vs
@@ -279,7 +279,7 @@ flattenSCC (NECyclicSCC (v :| vs)) = v : vs
279279

280280
-- | The vertices of a strongly connected component.
281281
--
282-
-- @since 0.7.1
282+
-- @since 0.8
283283
flattenSCC1 :: SCC vertex -> NonEmpty vertex
284284
flattenSCC1 (AcyclicSCC v) = v :| []
285285
flattenSCC1 (NECyclicSCC vs) = vs

containers/src/Data/IntMap/Internal.hs

+3-3
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ instance NFData a => NFData (IntMap a) where
531531
rnf (Tip _ v) = rnf v
532532
rnf (Bin _ l r) = rnf l `seq` rnf r
533533

534-
-- | @since 0.7.1
534+
-- | @since 0.8
535535
instance NFData1 IntMap where
536536
liftRnf rnfx = go
537537
where
@@ -1355,7 +1355,7 @@ intersectionWithKey f m1 m2
13551355
-- fromList [(2,\'b\'),(3,\'r\'),(4,\'w\'),(9,\'s\')]
13561356
-- @
13571357
--
1358-
-- @since FIXME
1358+
-- @since 0.8
13591359
symmetricDifference :: IntMap a -> IntMap a -> IntMap a
13601360
symmetricDifference t1@(Bin p1 l1 r1) t2@(Bin p2 l2 r2) =
13611361
case treeTreeBranch p1 p2 of
@@ -2694,7 +2694,7 @@ filter p m
26942694
--
26952695
-- > filterKeys (> 4) (fromList [(5,"a"), (3,"b")]) == singleton 5 "a"
26962696
--
2697-
-- @since FIXME
2697+
-- @since 0.8
26982698

26992699
filterKeys :: (Key -> Bool) -> IntMap a -> IntMap a
27002700
filterKeys predicate = filterWithKey (\k _ -> predicate k)

0 commit comments

Comments
 (0)