Death of deprecated functions

The following functions have been disabled. As an experiment
in function removal technology, the functions are still temporarily present,
but any attempts to use them will result in type errors advising on
replacement.

Performance improvements

Speed up several algorithms in Data.Graph a bit by using unboxed arrays
where appropriate.

Implement Data.Graph.indegree directly instead of taking the transpose
and calculating its outdegree. This may not lead to an immediate performance
improvement (see GHC Trac #14785)
but it should be better eventually.

Other package changes

Drop support for GHC versions before 7.6.

Improve Data.Graph documentation, and reorganize map and set documentation.

Remove the Data.Map.Lazy.Merge and Data.Map.Strict.Merge modules. These
were renamed and deprecated almost as soon as they were introduced.

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 by (Thanks, Donnacha
Oisín Kidney.)

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.)

0.5.10.2

Released with GHC 8.2.

Use COMPLETE pragmas to declare complete sets of pattern synonyms
for Data.Sequence. At last!

Make Data.IntMap.Strict.traverseWithKey force the values before
installing them in the result. Previously, this function could be used to
produce an IntMap containing undefined values.

Fix strictness bugs in various rewrite rules for Data.Map.Strict and
Data.IntMap.Strict. Previously, rules could unintentionally reduce
strictness. The most important change in this regard is the elimination
of rules rewriting *.Strict.map coerce to coerce. To map a coercion
over a structure for free, be sure to use the lazy map or fmap.
It is possible to write rules that do a somewhat better job of this, but
it turns out to be a bit messy.

Optimize Data.IntMap.restrictKeys and Data.IntMap.withoutKeys. The
semantic fix in 0.5.10.1 left them rather slow in certain cases.

Speed up size for IntSet and IntMap (thanks, Mike Ledger!).

Define a custom liftA2 in Applicative instances for base 4.10, and use
liftA2 rather than <*> whenever it may be beneficial.

Add liftA2-related RULES for Data.Sequence.

Export non-deprecated versions of showTree and showTreeWith from
Data.IntMap.Internal.Debug.

0.5.10.1

Fix completely incorrect implementations of Data.IntMap.restrictKeys and
Data.IntMap.withoutKeys. Make the tests for these actually run. (Thanks
to Tom Smalley for reporting this.)

Fix a minor bug in the Show1 instance of Data.Tree. This produced valid
output, but with fewer parentheses than Show. (Thanks, Ryan Scott.)

Add lookupMin and lookupMax to Data.Set and Data.Map as total
alternatives to findMin and findMax.

Add !? to Data.Map as a total alternative to !.

Avoid using deleteFindMin and deleteFindMax internally, preferring
total functions instead. New implementations of said functions lead to slight
performance improvements overall.

0.5.8.2

Backport bug fixes from 0.5.10.1.

0.5.8.1 Aug 2016

General package changes

Remove all attempts to support nhc98 and any versions of GHC
before 7.0.

Integrate benchmarks with Cabal. (Thanks, Gabriel Gonzalez!)

Make Cabal report required extensions properly, and stop using
default extensions. Note that we do not report extensions conditionally enabled
based on GHC version, as doing so would lead to a maintenance nightmare
with no obvious benefits.

Use BangPatterns throughout to reduce noise. This extension
is now required to compile containers.

Improve QuickCheck properties taking arbitrary functions by using
Test.QuickCheck.Function.Fun instead of evil Show instances
for functions.

Semantic changes

Make Data.Map.Strict.traverseWithKey force result values before
installing them in the new map.

Make drawTree handle newlines better. (Thanks, recursion-ninja!)

Deprecations

All functions in Data.Map proper that have been documented as deprecated since
version 0.5 or before now have DEPRECATED pragmas and will actually be
removed after another cycle or two.

Tree printing functions in Data.Map intended for library debugging are now
deprecated. They will continue to be available for the foreseeable future in
an internal module.

Performance changes

Substantially speed up splitAt, zipWith, take, drop,
fromList, partition, foldl', and foldr' for Data.Sequence.
Special thanks to Lennart Spitzner for digging into the performance
problems with previous versions of fromList and finding a way to
make it really fast. Slightly optimize replicateA. Stop traverse
from performing many unnecessary fmap operations.

Most operations in Data.Sequence advertised as taking logarithmic
time (including >< and adjust) now use their full allotted time
to avoid potentially building up chains of thunks in the tree. In general,
the only remaining operations that avoid doing more than they
really need are the particular bulk creation and transformation functions
that really benefit from the extra laziness. There are some situations
where this change may slow programs down, but I think having more
predictable and usually better performance more than makes up for that.

Add rewrite rules to fuse fmap with reverse for Data.Sequence.

Switch from hedge algorithms to divide-and-conquer algorithms
for union, intersection, difference, and merge in both Data.Map
and Data.Set. These algorithms are simpler, are known to be
asymptotically optimal, and are faster according to our benchmarks.

Speed up adjust for Data.Map. Allow map to inline, and
define a custom (<$). This considerably improves mapping with
a constant function.

While the old Data.Map and
Data.IntMap modules will continue to exist for the foreseeable future, we’ve
abandoned the practice of having the strict and lazy versions of each
function distinguished by an apostrophe. The distinction is instead made at
the module level, by introducing four new modules:

Data.Map.Strict

Data.Map.Lazy

Data.IntMap.Strict

Data.IntMap.Lazy

This split has three benefits:

It makes the choice between value-strict and value-lazy containers
more declarative; you pick once at import time, instead of having to
remember to use the strict or lazy versions of a function every time
you modify the container.

It alleviates a common source of performance issues, by forcing the
user to think about the strictness properties upfront. For example,
using insertWith instead of insertWith’ is a common source of
containers-related performance bugs.

There are fewer functions per module, making it easier to get an
overview of each module.

Note that the types used in the strict and lazy APIs are the same, so
you can still use the same container in a “mixed” manner, if needed.

The Data.IntSet representation changed to store small sets using
bits in an Word. Larger sets are stored as a collection of such
dense small sets, connected together by a prefix trie.

0.4.2.1 Feb 2012

Bundled with GHC 7.4.1.

Data.Map now exportsfoldr,foldr’,foldlandfoldl’`.

Data.Set now exportsfoldr,foldr’,foldlandfoldl’`.

Data.IntMap now exportsfoldr,foldr’,foldl,foldl’,foldrWithKey,foldrWithKey’,foldlWithKeyandfoldlWithKey’`.

Data.IntSet now exportsfoldr,foldr’,foldlandfoldl’`.

Data.Map.foldWithKey is no longer deprecated, although it is expected to be deprecated again in the future.

There are now NFData instance for Data.Map.Map, Data.Set.Set, Data.IntMap.IntMap, Data.IntSet.IntSet and Data.Tree.Tree.

0.4.1.0 Aug 2011

Bundled with GHC 7.2.1.

Data.Map now exports new functions foldrWithKey' and foldlWithKey', which are strict variants of foldrWithKey and foldlWithKey respectively.

Data.IntMap now exports new functions insertWith' and insertWithKey', which are strict variants of insertWith and insertWithKey respectively.

0.4.0.0 Nov 2010

Bundled with GHC 7.0.1.

Strictness is now more consistent, with containers being strict in their elements even in singleton cases.

There is a new function insertLookupWithKey' in Data.Map.

The foldWithKey function in Data.Map has been deprecated in favour of foldrWithKey.