[Haskell-cafe] ANN: containers-

David Feuer david.feuer at gmail.com
Tue Jan 23 20:19:50 UTC 2018

We have just released containers version This is the first
release since Matt Renaud joined the maintenance team. Matt has
focused on documentation, code quality, and testing, and made some
substantial contributions in these areas.

This release comes with quite a few new functions and instances,
written by quite a few different contributors. It also includes a
complete overhaul of the sorting machinery in Data.Sequence thanks to
Donnacha Oisín Kidney. And Matt Renaud has launched a brand new set of
tutorial documentation at

Many thanks to all the contributors who made this release possible!
The complete changelog can be found below.

David Feuer
Matt Renaud
Wren Romano

New functions and class instances

* Add a `MonadFix` instance for `Data.Sequence`.

* Add a `MonadFix` instance for `Data.Tree`.

* Add `powerSet`, `cartesianProduct`, and `disjointUnion` for
  `Data.Set`. (Thanks, Edward Kmett.)

* Add `disjoint` for `Data.Set` and `Data.IntSet`. (Thanks, Víctor López Juan.)

* Add `lookupMin` and `lookupMax` to `Data.IntMap`. (Thanks, bwroga.)

* Add `unzip` and `unzipWith` to `Data.Sequence`. Make unzipping
  build its results in lockstep to avoid certain space leaks.

* Add carefully optimized implementations of `sortOn` and `unstableSortOn`
  to `Data.Sequence`. (Thanks, Donnacha Oisín Kidney.)

Changes to existing functions and features

* Make `Data.Sequence.replicateM` a synonym for `replicateA`
  for post-AMP `base`.

* Rewrite the `IsString` instance head for sequences, improving compatibility
  with the list instance and also improving type inference. We used to have

      instance IsString (Seq Char)

  Now we commit more eagerly with

      instance a ~ Char => IsString (Seq a)

* Make `>>=` for `Data.Tree` strict in the result of its second argument;
  being too lazy here is almost useless, and violates one of the monad identity
  laws. Specifically, `return () >>= \_ -> undefined` should always be
  `undefined`, but this was not the case.

* Harmonize laziness details for `minView` and `maxView` between
  `Data.IntMap` and `Data.Map`.

Performance improvement

* Speed up both stable and unstable sorting for `Data.Sequence`
(Thanks, Donnacha Oisín Kidney.)

Other changes

* Update for recent and upcoming GHC and Cabal versions (Thanks, Herbert
  Valerio Reidel, Simon Jakobi, and Ryan Scott.)

* Improve external and internal documentation (Thanks, Oleg Grenrus
  and Benjamin Hodgson.)

* Add tutorial-style documentation.

* Add Haddock `@since` annotations for changes made since version
  0.5.4 (Thanks, Simon Jakobi.)

* Add a (very incomplete) test suite for `Data.Tree`.

* Add structural validity checks to the test suites for `Data.IntMap`
  and `Data.IntSet` (Thanks to Joachim Breitner for catching an error
  in a first draft.)

More information about the Haskell-Cafe mailing list